/* =========================================================================
   GED — Groupe des Experts pour le Développement
   Feuille de style unique. Aucune dépendance externe.
   Palette reprise du logo : vert (anneau), bleu (globe), orange (poignée
   de main), rouge réservé aux accents rares.
   ========================================================================= */

:root {
    --vert: #15803d;
    --vert-fonce: #0d5427;
    --vert-clair: #eaf5ee;
    --bleu: #1b5fa8;
    --bleu-clair: #eaf1f9;
    --orange: #e2830f;
    --encre: #14201a;
    --gris: #5c6b62;
    --gris-clair: #e4e9e6;
    --fond: #ffffff;
    --fond-doux: #f5f8f6;

    --largeur: 1180px;
    --rayon: 10px;
    --ombre: 0 1px 2px rgba(20, 32, 26, .06), 0 8px 24px rgba(20, 32, 26, .07);
    --transition: .18s ease;
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--encre);
    background: var(--fond);
    -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--vert-fonce); }
a:hover { color: var(--vert); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.015em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.conteneur {
    width: 100%;
    max-width: var(--largeur);
    margin-inline: auto;
    padding-inline: 20px;
}

/* Lien d'évitement pour la navigation au clavier */
.saut-contenu {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--vert);
    color: #fff;
    padding: 12px 20px;
    z-index: 100;
}
.saut-contenu:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------------------------------------------------------------- En-tête */
.bandeau-info {
    background: var(--encre);
    color: #cfd8d2;
    font-size: .82rem;
}
.bandeau-info .conteneur {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    justify-content: flex-end;
    padding-block: 7px;
}
.bandeau-info a { color: #cfd8d2; text-decoration: none; }
.bandeau-info a:hover { color: #fff; text-decoration: underline; }

.entete {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--gris-clair);
}
.entete .conteneur {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 76px;
}

.marque { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: none; }
.marque img { width: 52px; height: 52px; object-fit: contain; }
.marque-texte { display: flex; flex-direction: column; }
.marque-sigle { font-weight: 800; font-size: 1.35rem; letter-spacing: .04em; color: var(--vert-fonce); line-height: 1; }
.marque-nom {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--gris);
    white-space: nowrap;
}
/* Le nom complet encombre dès que la navigation devient dense. */
@media (max-width: 1150px) and (min-width: 861px) {
    .marque-nom { display: none; }
}

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav a {
    display: block;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: .92rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--encre);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.nav a:hover { background: var(--vert-clair); color: var(--vert-fonce); }
.nav a[aria-current="page"] { color: var(--vert-fonce); background: var(--vert-clair); }

.nav-bouton {
    display: none;
    margin-left: auto;
    padding: 9px 14px;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--encre);
    background: var(--fond-doux);
    border: 1px solid var(--gris-clair);
    border-radius: 8px;
    cursor: pointer;
}

/* ---------------------------------------------------------------- Boutons */
.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .97rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), color var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn-primaire { background: var(--vert); color: #fff; }
.btn-primaire:hover { background: var(--vert-fonce); color: #fff; }
.btn-secondaire { border-color: var(--gris-clair); color: var(--encre); background: #fff; }
.btn-secondaire:hover { border-color: var(--vert); color: var(--vert-fonce); }
.btn-clair { background: #fff; color: var(--vert-fonce); }
.btn-contour-clair { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-contour-clair:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ------------------------------------------------------------------ Héros */
.heros {
    position: relative;
    color: #fff;
    background: var(--encre);
}
.heros::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(13, 84, 39, .93) 0%, rgba(13, 84, 39, .78) 45%, rgba(20, 32, 26, .60) 100%);
    z-index: 1;
}
.heros img.heros-fond {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.heros .conteneur { position: relative; z-index: 2; padding-block: clamp(64px, 11vw, 116px); }
.heros-texte { max-width: 680px; }
.heros h1 { color: #fff; }
.heros p { font-size: 1.1rem; color: rgba(255, 255, 255, .9); max-width: 58ch; }
.heros-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.surtitre {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* Bandeau de titre des pages intérieures */
.banniere {
    position: relative;
    color: #fff;
    background: var(--vert-fonce);
    overflow: hidden;
}
.banniere::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(13, 84, 39, .95), rgba(27, 95, 168, .75));
    z-index: 1;
}
.banniere img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banniere .conteneur { position: relative; z-index: 2; padding-block: clamp(46px, 7vw, 74px); }
.banniere h1 { color: #fff; margin-bottom: .3em; }
.banniere p { color: rgba(255, 255, 255, .9); max-width: 62ch; margin: 0; }

/* --------------------------------------------------------------- Sections */
.section { padding-block: clamp(48px, 7vw, 82px); }
.section-douce { background: var(--fond-doux); }
.section-tete { max-width: 62ch; margin-bottom: 40px; }
.section-tete.centre { margin-inline: auto; text-align: center; }
.section-tete p { color: var(--gris); font-size: 1.04rem; margin-bottom: 0; }

.etiquette {
    display: block;
    margin-bottom: 10px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--vert);
}

/* ------------------------------------------------------------------ Grille */
.grille { display: grid; gap: 26px; }
.grille-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grille-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grille-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* ------------------------------------------------------------------ Cartes */
.carte {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre); }
.carte-image { aspect-ratio: 16 / 10; background: var(--fond-doux); }
.carte-image img { width: 100%; height: 100%; object-fit: cover; }
.carte-corps { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.carte-corps h3 { margin-bottom: .4em; }
.carte-corps p { color: var(--gris); font-size: .96rem; }
.carte-lien {
    margin-top: auto;
    padding-top: 14px;
    font-weight: 600;
    font-size: .94rem;
    text-decoration: none;
    color: var(--vert-fonce);
}
.carte-lien::after { content: " →"; }
.carte-lien:hover { text-decoration: underline; }

/* Liste à puces vertes */
.liste-check { list-style: none; margin: 0; padding: 0; }
.liste-check li {
    position: relative;
    padding-left: 27px;
    margin-bottom: 9px;
    font-size: .97rem;
}
.liste-check li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .52em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--vert);
}

/* Petites étiquettes de détail */
.jetons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; padding: 0; list-style: none; }
.jetons li {
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--vert-clair);
    color: var(--vert-fonce);
    font-size: .82rem;
    font-weight: 600;
}

/* ------------------------------------------------------- Blocs alternés */
.duo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: center;
}
.duo + .duo { margin-top: clamp(44px, 6vw, 72px); }
/* Alternance image gauche / image droite, pilotée par la classe .duo-inverse
   posée dans le gabarit : plus fiable qu'un nth-of-type dépendant du balisage. */
@media (min-width: 861px) {
    .duo-inverse .duo-image { order: -1; }
}
/* Cadrage constant : certaines photos de chantier sont en portrait, elles
   déséquilibreraient la page si on les laissait à leur hauteur naturelle. */
.duo-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}

/* ---------------------------------------------------------------- Chiffres */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.chiffre {
    padding: 26px 22px;
    background: #fff;
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    text-align: center;
}
.chiffre strong { display: block; font-size: 1.7rem; color: var(--vert-fonce); line-height: 1.15; }
.chiffre span { font-size: .88rem; color: var(--gris); }

/* ------------------------------------------------------------- Mot du DG */
.mot-dg {
    background: #fff;
    border: 1px solid var(--gris-clair);
    border-left: 5px solid var(--vert);
    border-radius: var(--rayon);
    padding: clamp(26px, 4vw, 44px);
}
.mot-dg p:first-of-type::first-letter {
    float: left;
    font-size: 3.1rem;
    line-height: .85;
    padding: 4px 10px 0 0;
    color: var(--vert);
    font-weight: 700;
}
.mot-dg .signature { margin-top: 22px; margin-bottom: 0; font-weight: 700; color: var(--vert-fonce); }
.mot-dg .signature span { display: block; font-weight: 400; font-size: .88rem; color: var(--gris); }

/* --------------------------------------------------------------- Galerie */
.galerie-figure {
    margin: 0;
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    overflow: hidden;
    background: #fff;
}
.galerie-figure img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.galerie-figure figcaption { padding: 18px 20px 22px; }
.galerie-figure h3 { font-size: 1.05rem; margin-bottom: .35em; }
.galerie-figure p { font-size: .92rem; color: var(--gris); margin-bottom: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: .78rem; }
.meta span {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bleu-clair);
    color: var(--bleu);
    font-weight: 600;
}

/* ----------------------------------------------------------------- Appel */
.appel {
    background: linear-gradient(100deg, var(--vert-fonce), var(--bleu));
    color: #fff;
}
.appel .conteneur { padding-block: clamp(44px, 6vw, 66px); text-align: center; }
.appel h2 { color: #fff; }
.appel p { color: rgba(255, 255, 255, .9); max-width: 58ch; margin-inline: auto; }
.appel-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

/* --------------------------------------------------------------- Contact */
.contact-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; align-items: start; }

.coordonnees { list-style: none; margin: 0; padding: 0; }
.coordonnees li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--gris-clair); }
.coordonnees li:last-child { border-bottom: 0; }
.coordonnees strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gris); font-weight: 700; }
.coordonnees a { text-decoration: none; font-weight: 600; }
.coordonnees a:hover { text-decoration: underline; }
.pastille {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--vert-clair);
    color: var(--vert-fonce);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .95rem;
}

.formulaire {
    background: #fff;
    border: 1px solid var(--gris-clair);
    border-radius: var(--rayon);
    padding: clamp(22px, 3.5vw, 34px);
}
.champ { margin-bottom: 18px; }
.champ label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .92rem; }
.champ .obligatoire { color: #b42318; }
.champ input, .champ select, .champ textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: .97rem;
    color: var(--encre);
    background: #fff;
    border: 1px solid var(--gris-clair);
    border-radius: 8px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
    border-color: var(--vert);
    box-shadow: 0 0 0 3px var(--vert-clair);
    outline: none;
}
.champ textarea { min-height: 148px; resize: vertical; }
.champ-erreur input, .champ-erreur select, .champ-erreur textarea { border-color: #b42318; }
.message-erreur { display: block; margin-top: 5px; font-size: .85rem; color: #b42318; }
/* Piège à robots : invisible pour les humains, rempli par les automates */
.pot-de-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alerte { padding: 16px 20px; border-radius: 8px; margin-bottom: 26px; font-size: .96rem; }
.alerte-succes { background: var(--vert-clair); border: 1px solid var(--vert); color: var(--vert-fonce); }
.alerte-echec { background: #fdecea; border: 1px solid #f0b4ae; color: #8c1d18; }
.alerte p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ Pied de page */
.pied { background: var(--encre); color: #b9c4bd; font-size: .93rem; padding-block: 54px 0; }
.pied h2, .pied h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.pied a { color: #b9c4bd; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: 8px; }
.pied-grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.pied-marque { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pied-marque img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.pied-marque strong { color: #fff; font-size: 1.2rem; letter-spacing: .04em; }
.pied-bas {
    margin-top: 44px;
    padding-block: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: space-between;
    font-size: .85rem;
}
.pied-bas .credit strong { color: #fff; font-weight: 700; }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
    .pied-grille { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 860px) {
    .nav-bouton { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--gris-clair);
        box-shadow: var(--ombre);
        padding: 10px 20px 18px;
    }
    .nav.ouvert { display: block; }
    .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .nav a { padding: 13px 12px; border-radius: 0; border-bottom: 1px solid var(--gris-clair); }
    .nav li:last-child a { border-bottom: 0; }
    .entete .conteneur { position: relative; }
    .bandeau-info .conteneur { justify-content: center; }
}

@media (max-width: 520px) {
    body { font-size: 16px; }
    .heros-actions .btn, .appel-actions .btn { width: 100%; text-align: center; }
}

@media print {
    .entete, .bandeau-info, .nav, .appel, .heros-actions { display: none; }
    body { font-size: 12pt; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
