/*
  PLAN de Mise en forme accueil.css :

  1) HERO
     - mettre une grande image de fond
     - ajouter un filtre sombre par-dessus pour lire le texte
     - centrer le titre + le texte
     - placer le formulaire au centre dans une carte claire

  2) LARGEUR / CONTENEUR
     - garder une largeur max (ex : 1440px)
     - ajouter du padding à gauche/droite
     - éviter que le contenu colle aux bords

  3) EN-TÊTE / NAVIGATION
     - aligner logo à gauche et navigation à droite (desktop)
     - en mobile : afficher un bouton "Menu"
     - en mobile : la navigation doit devenir un panneau déroulant

  4) FORMULAIRE DE RECHERCHE
     - afficher 4 champs sur une ligne (desktop)
     - passer à 2 colonnes puis 1 colonne en responsive
     - garder des champs lisibles et un bouton large

  5) ATOUTS
     - afficher 3 cartes alignées
     - icône ronde au-dessus du titre
     - texte centré et espacé

  6) BANNIÈRE BAS
     - afficher une deuxième image décorative avec un léger filtre

  7) PIED DE PAGE
     - afficher contact / copyright / mentions légales sur une ligne
     - en mobile : empiler les éléments
*/

/* HERO */

.section_hero {
    position: relative;
    padding: 160px 0;
    overflow: hidden;
}

.hero_image {
    position: absolute;
    inset: 0;
    background: url("/images/accueil_1.jpg") center / cover no-repeat;
}

.hero_filtre {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.hero_contenu {
    position: relative;
    z-index: 1;
}

.hero_centre {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.hero_description {
    margin: 16px 0 32px;
    color: var(--texte_secondaire);
    font-size: 16px;
    line-height: 1.6;
}

/* EN-TÊTE */

/* Largeur globale */
.entete,
.pied_de_page {
    width: 100%;
}

/* Conteneur : garantir le padding même si global.css a une autre règle */
.entete .conteneur,
.pied_de_page .conteneur {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
    box-sizing: border-box;
}

/* Header : alignement logo / nav / bouton menu */
.entete_contenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    margin: 0;
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    color: var(--texte_principal);
}

/* Navigation desktop */

.navigation {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.nav_lien {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 10px;

    color: var(--texte_secondaire);
    text-decoration: none;
    font-weight: 600;
}

.nav_lien:hover {
    color: var(--texte_principal);
}

/* Lien actif : soit classe .actif, soit aria-current */
.nav_lien.actif,
.nav_lien[aria-current="page"] {
    color: var(--texte_principal);
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: var(--action_principale);
}

.navigation .nav_lien[aria-current="page"] {
    cursor: default;
}

/* Lien placeholder désactivé (ex : Connexion tant que la page n’existe pas) */
.navigation .nav_lien[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Déconnexion en POST : le <form> ne doit pas casser l'alignement de la navigation */
.navigation_formulaire {
    display: inline;
    margin: 0;
}

/* Le <button> doit ressembler à un lien .nav_lien */
.navigation_formulaire .nav_lien {
    background: none;
    border: 0;
    padding: 6px 10px;
    /* même padding que .nav_lien */
    border-radius: 10px;
    /* même arrondi */
    color: var(--texte_secondaire);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.navigation_formulaire .nav_lien:hover {
    color: var(--texte_principal);
}

/* Si un bouton de navigation reçoit aria-current, même style actif */
.navigation_formulaire .nav_lien[aria-current="page"]{
    color: var(--texte_principal);
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: var(--action_principale);
}

/* BOUTON MENU (MOBILE) */

/* caché en plein écran */
.bouton_menu {
    display: none;
    align-items: center;
    gap: 10px;

    min-height: 44px;
    padding: 8px 12px;

    border-radius: 12px;
    border: 1px solid rgba(199, 195, 184, 0.28);
    background: rgba(15, 23, 42, 0.35);

    color: var(--texte_principal);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
}

.bouton_menu:focus-visible {
    outline: 3px solid var(--anneau_focus);
    outline-offset: 3px;
}

/* Petit pictogramme (3 barres) sans image */
.bouton_menu_icone {
    width: 20px;
    height: 14px;
    position: relative;
    display: inline-block;
}

.bouton_menu_icone::before,
.bouton_menu_icone::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--texte_principal);
}

.bouton_menu_icone::before {
    top: 0;
    box-shadow: 0 6px 0 var(--texte_principal);
}

.bouton_menu_icone::after {
    bottom: 0;
}

/* FORMULAIRE DE RECHERCHE */

.formulaire_recherche {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;

    background: var(--surface_beige);
    border: 1px solid var(--bordure);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);

    box-sizing: border-box;
}

.formulaire_recherche * {
    box-sizing: border-box;
}

.formulaire_grille {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.champ_groupe {
    min-width: 0;
    text-align: left;
}

.champ_groupe label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
}

.champ_groupe input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 44px;

    padding: 10px 12px;
    border: 1px solid var(--bordure);
    border-radius: 10px;

    background: #ffffff;
    color: #1f2937;

    font-family:
        "Inter",
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    font-size: 16px;

    outline: none;
}

.champ_groupe input:focus-visible {
    outline: 3px solid var(--anneau_focus);
    outline-offset: 2px;
}

.formulaire_recherche .bouton_principal {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

/* ATOUTS */

.section_atouts {
    padding: 64px 0;
}

.section_atouts h2 {
    text-align: center;
    margin: 0 0 40px;
}

.atouts_grille {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
    align-items: start;
}

.atout_bloc {
    max-width: 360px;
    margin: 0 auto;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.atout_icone {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: var(--action_principale);
    margin: 0 auto 16px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* ICONES SVG */

.atout_image {
    width: 28px;
    height: 28px;
    display: block;
}

.atout_bloc h3 {
    margin: 0 0 12px;

    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.atout_bloc p {
    margin: 0;
    max-width: 320px;
    color: var(--texte_secondaire);
    line-height: 1.6;
    font-size: 16px;
    text-align: center;
}

/* BANNIÈRE IMAGE*/

.banniere_pied {
    position: relative;
    height: 300px;
    overflow: hidden;
    margin-top: 0px;
}

.banniere_image {
    position: absolute;
    inset: 0;
    background: url("/images/accueil_2.jpg") center / cover no-repeat;
}

.banniere_filtre {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
}

/* PIED DE PAGE */

.pied_de_page {
    padding: 24px 0;
    border-top: none;
}

.pied_contenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pied_contenu a {
    color: var(--texte_secondaire);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pied_contenu a:hover {
    color: var(--texte_principal);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .formulaire_grille {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .pied_contenu {
        flex-direction: column;
    }
}

@media (max-width: 650px) {
    .section_hero {
        padding: 56px 0;
    }

    .formulaire_grille {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .atouts_grille {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Padding conteneur en mobile */

@media (max-width: 900px) {
    .entete .conteneur,
    .pied_de_page .conteneur {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Suggestions géocodage*/

.panneau_suggestions{
  position: absolute;
  z-index: 50;
  width: 100%;
  margin-top: 6px;
  background: #FFFFFF;
  border: 1px solid rgba(199,195,184,0.75);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  overflow: hidden;
}

.champ_groupe,
.groupe_champ,
.champ{
  position: relative;
}

.suggestion_item{
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  color: #0F172A;
  cursor: pointer;
  display: block;
  min-height: 44px;
}

.suggestion_item:hover,
.suggestion_item:focus-visible{
  background: rgba(63,93,74,0.10);
  outline: none;
}


/* RESPONSIVE */

@media (max-width: 900px) {
    .bouton_menu {
        display: inline-flex;
    }

    .entete {
        position: relative;
    }

    .navigation {
        position: absolute;
        z-index: 10;
        top: calc(100% + 10px);
        right: 0;
        left: 0;

        display: grid;
        gap: 8px;

        padding: 12px;
        border-radius: 14px;

        background: rgba(15, 23, 42, 0.92);
        border: 1px solid rgba(199, 195, 184, 0.22);

        /* caché par défaut */
        opacity: 0;
        transform: translateY(-6px);
        pointer-events: none;
    }

    /* état ouvert (piloté par js) */
    .navigation[data-ouvert="true"] {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav_lien {
        justify-content: center;
        width: 100%;
    }
}

