:root {
    --ink: #1c1b1f;
    --ink-soft: #26242a;
    --line: #37343c;
    --paper: #faf8f4;
    --accent: #d98e34;
    --accent-soft: rgba(217, 142, 52, 0.16);
    --text: #f3f0ea;
    --text-muted: #a9a6a1;
    --ok: #3fae6a;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--ink);
    font-family: 'Inter', Arial, Helvetica, sans-serif;
}

/* ---------- En-tête ---------- */

.entete {
    flex: 0 0 auto;
    background-color: var(--ink);
    color: var(--text);
    text-align: center;
    padding: 18px 20px 10px;
    border-bottom: 1px solid var(--line);
}

.entete h1 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    letter-spacing: 0.01em;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.entete h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

.lien-inscription {
    margin: 10px auto 0;
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(217, 142, 52, 0.4);
    text-underline-offset: 3px;
}

.lien-inscription:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* ---------- Modale d'inscription photographe ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 16, 19, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 20000;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-boite {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: var(--paper);
    color: var(--ink);
    border-radius: 12px;
    padding: 26px 24px 22px;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
}

.modal-boite h2 {
    margin: 0 0 16px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-fermer {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: #8a857b;
    cursor: pointer;
    padding: 4px;
}

.modal-fermer:hover {
    color: var(--ink);
}

.champ-groupe {
    margin-bottom: 14px;
}

.champ-groupe label,
.champ-groupe .champ-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7d7970;
    margin-bottom: 6px;
}

.champ-groupe input[type="text"],
.champ-groupe select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd6c9;
    border-radius: 8px;
    background-color: #fff;
    color: var(--ink);
    font-size: 0.95rem;
    font-family: inherit;
}

.champ-groupe label .facultatif {
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    color: #a9a49a;
}

.champ-groupe select:disabled {
    background-color: #f0eee8;
    color: #a9a49a;
    cursor: not-allowed;
}

.champ-groupe input[type="text"]:focus-visible,
.champ-groupe select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.toggle-groupe {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 9px 0;
    border: 1px solid #ddd6c9;
    border-radius: 8px;
    background-color: #fff;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.toggle-btn:hover {
    border-color: var(--accent);
}

.toggle-btn.actif {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
}

.btn-envoyer {
    width: 100%;
    margin-top: 6px;
    padding: 11px 0;
    border: none;
    border-radius: 999px;
    background-color: var(--accent);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.btn-envoyer:hover {
    filter: brightness(1.08);
}

.btn-envoyer:disabled {
    filter: grayscale(0.3);
    cursor: not-allowed;
}

.reg-erreur {
    background-color: #fbe9e4;
    color: #a3402a;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.85rem;
    margin: 0 0 14px;
}

.confirmation {
    text-align: center;
    padding: 10px 4px 4px;
}

.confirmation p {
    color: #2c7a4b;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ---------- Formulaire de recherche ---------- */

.form-recherche {
    flex: 0 0 auto;
    background-color: var(--ink);
    padding: 4px 20px 16px;
    text-align: center;
}

.form-recherche label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.champ-recherche {
    display: inline-flex;
    width: 100%;
    max-width: 420px;
    background-color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px;
    gap: 6px;
}

.champ-recherche input[type="text"] {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    padding: 9px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}

.champ-recherche input[type="text"]::placeholder {
    color: var(--text-muted);
}

.champ-recherche input[type="submit"] {
    border: none;
    border-radius: 999px;
    background-color: var(--accent);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 9px 20px;
    cursor: pointer;
    transition: filter 0.15s ease;
    font-family: inherit;
}

.champ-recherche input[type="submit"]:hover {
    filter: brightness(1.08);
}

.champ-recherche input[type="submit"]:focus-visible,
.champ-recherche input[type="text"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Carte + panneau photographes ---------- */

.carte-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    padding: 0 20px 20px;
}

#map {
flex: 1 1 55%;
min-width: 0;
border-radius: 10px;
overflow: hidden;
border: 1px solid var(--line);
}

.photographes-panel {
    flex: 1 1 32%;
    min-width: 260px;
    max-width: 380px;
    min-height: 0;
    overflow-y: auto;
    background-color: var(--paper);
    border-radius: 10px;
    padding: 14px;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
}

.photographes-panel::-webkit-scrollbar {
    width: 8px;
}

.photographes-panel::-webkit-scrollbar-thumb {
    background-color: #ddd6c9;
    border-radius: 4px;
}

.photographes-placeholder {
    color: #948f86;
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Une tuile par photographe correspondant à la recherche */
.photographe-tuile {
    background-color: #ffffff;
    border-left: 3px solid var(--ok);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(28, 27, 31, 0.06);
}

.photographe-tuile:last-child {
    margin-bottom: 0;
}

.photographe-tuile .nom {
    font-weight: 600;
    font-size: 1.02em;
    color: var(--ink);
}

.photographe-tuile .details {
    color: #6b6760;
    font-size: 0.85em;
    margin-top: 4px;
}

/* Icônes de contact cliquables (téléphone, site, Instagram, Facebook) */
.contacts-icones {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.contacts-icones a,
.contacts-icones button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background-color: var(--accent-soft);
    color: var(--ink);
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.contacts-icones a:hover,
.contacts-icones button:hover {
    background-color: var(--accent);
}

.contacts-icones svg {
    width: 13px;
    height: 13px;
    display: block;
}

/* Conteneur de l'icône téléphone, sert de repère de positionnement à la bulle */
.tel-wrap {
    position: relative;
    display: inline-flex;
}

/* Bulle affichant le numéro au clic sur l'icône téléphone.
 *  Attachée au <body> et positionnée en "fixed" par calcul JS (voir
 *  script.js), afin de ne jamais être compressée ou coupée par
 *  l'étroitesse d'une popup Leaflet ou de tout autre conteneur. */
.tel-reveal-bubble {
    position: fixed;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    color: var(--ink);
    padding: 8px 22px 8px 14px;
    border: 1px solid #ddd6c9;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    z-index: 30000;
}

/* Flèche pointant vers l'icône ; --fleche-x est calculée en JS pour
 *  toujours pointer vers l'icône même si la bulle a été décalée pour
 *  rester dans l'écran */
.tel-reveal-bubble::after {
    content: "";
    position: absolute;
    left: var(--fleche-x, 50%);
    transform: translateX(-50%);
    border: 5px solid transparent;
}

.tel-reveal-bubble:not(.tel-reveal-bubble--bas)::after {
    top: 100%;
    border-top-color: #ffffff;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.12));
}

.tel-reveal-bubble--bas::after {
    bottom: 100%;
    border-bottom-color: #ffffff;
    filter: drop-shadow(0 -2px 1px rgba(0, 0, 0, 0.12));
}

.tel-bulle-numero {
    color: var(--ink);
    text-decoration: none;
}

.tel-bulle-numero:hover {
    text-decoration: underline;
}

.tel-bulle-fermer {
    position: absolute;
    top: 3px;
    right: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #948f86;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.tel-bulle-fermer:hover {
    color: var(--ink);
    background-color: #f0eee8;
}

/* Variante compacte utilisée dans les popups Leaflet */
.popup-contacts.contacts-icones a,
.popup-contacts.contacts-icones button {
    width: 24px;
    height: 24px;
}

/* Badge de regroupement quand plusieurs photographes partagent la même ville */
.cluster-photographes-wrapper {
    background: transparent;
}

.cluster-photographes {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 2px solid var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Assure que la liste des suggestions passe au-dessus de la carte Leaflet */
.ui-autocomplete {
    z-index: 21000 !important;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    border-radius: 8px;
    border: 1px solid var(--line);
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .carte-wrapper {
        flex-direction: column;
        align-items: stretch;
        flex: 1 1 auto;
    }

    #map {
    flex: 0 0 auto;
    width: 100%;
    height: 48vh;
    }

    .photographes-panel {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 32vh;
    }
}
