/* =========================
   Palette & reset
   ========================= */

:root {
    --gac-anthracite: #2C2F33;
    --gac-grey: #5A5F64;
    --gac-light: #D5D2CD;
    --gac-grey-soft: #E4E2DF;      /* Gris minéral global */
    --gac-grey-card: #EBE9E6;      /* Gris clair pour les blocs */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Open Sans", sans-serif;
    color: var(--gac-grey);
    background: var(--gac-grey-soft); /* Fond gris homogène */
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--gac-anthracite);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    color: var(--gac-anthracite);
    margin-top: 0;
}

/* =========================
   Layout global
   ========================= */

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* =========================
   Header
   ========================= */

.site-header {
    background: rgba(228, 226, 223, 0.92);
    backdrop-filter: blur(3px);
    border-bottom: 1px solid var(--gac-light);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.logo img {
    height: 58px;
}

/* Navigation */

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.main-nav a {
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 0;
    height: 2px;
    background: var(--gac-anthracite);
    transition: width 0.2s ease-out;
}

.main-nav a:hover::after {
    width: 100%;
}

/* =========================
   HERO AVEC COURBE
   ========================= */

.hero {
    position: relative;
    overflow: hidden;
    padding: 3.2rem 0 2.8rem;
    background: var(--gac-grey-soft);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -30% -40% auto -40%;
    height: 70%;
    background: radial-gradient(circle at top left,
        #D8D5D0 0%,
        #E4E2DF 60%,
        #E4E2DF 100%);
    border-bottom-left-radius: 60% 35%;
    border-bottom-right-radius: 60% 35%;
    z-index: -1;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 2.4rem;
    align-items: stretch; /* au lieu de center */
}
.hero-image {
    height: 100%;
    display: flex;
    align-items: stretch;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* couvre la hauteur sans déformation */
    border-radius: 8px;
}


.hero-text h1 {
    font-size: 2.1rem;
    margin-bottom: 1rem;
}

.hero-text p {
    margin-bottom: 1.6rem;
}

/* =========================
   Boutons
   ========================= */

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    border: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.btn-primary {
    background: var(--gac-anthracite);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-secondary {
    background: transparent;
    color: var(--gac-anthracite);
    border: 1px solid var(--gac-anthracite);
}

.btn-secondary:hover {
    background: var(--gac-anthracite);
    color: #fff;
}

/* =========================
   4 PILIERS
   ========================= */

.pillars {
    padding: 2.5rem 0 2rem;
}

.pillars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center; /* Centre les cartes si 1, 2 ou 3 */
}

/* Chaque carte conserve ton style mais devient flexible */
.pillar-card {
    display: flex;
    flex-direction: column;

    /* ⭐ Le changement qui règle TOUT */
    flex: 1 1 calc(33.333% - 40px);

    max-width: 420px;  /* Largeur visuelle confortable */
    min-width: 280px;  /* Empêche d'être trop petites */

    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1rem;
}

/* Le texte doit prendre l’espace flexible */
.pillar-card p {
    flex-grow: 1;
}

/* Le bouton doit se placer en bas */
.pillar-card .btn-secondary {
    margin-top: auto;
}


.pillar-card img {
    border-radius: 4px;
    margin-bottom: 0.8rem;
    height: 150px;
    object-fit: cover;
}

.pillar-card h2 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.pillar-card p {
    font-size: 0.9rem;
    flex: 1;
    margin-bottom: 0.9rem;
}
/* =========================
   SECTIONS
   ========================= */
.details-section {
    padding: 3.5rem 0;
    background: var(--gac-grey-soft);
    border-top: 1px solid var(--gac-light);
}

.details-section h2 {
    font-size: 1.4rem;
    color: var(--gac-anthracite);
    margin-bottom: 1rem;
}

.details-section div {
    font-size: 0.95rem;
    color: var(--gac-grey);
    line-height: 1.7;
}
html {
    scroll-behavior: smooth;
}
/* =========================
   Styles pour titres détaillés
   ========================= */
.details-title {
    background: #C2C0BC; /* Gris minéral proche de ta capture */
    padding: 1.2rem 1.4rem;
    text-align: center;
    position: relative;
    color: var(--gac-anthracite);
    font-weight: bold;
    margin-bottom: 2rem;
}

/* La petite pointe */
.details-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -18px; /* distance de la pointe */
    transform: translateX(-50%);
    width: 0;
    height: 0;

    /* Création du triangle */
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 18px solid #C2C0BC; /* couleur identique au fond */
}

/* On donne un peu de marge pour ne pas coller la suite du contenu */
.details-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background: var(--gac-grey-soft);
}
  
   
/* =========================
   Footer
   ========================= */

.site-footer {
    border-top: 1px solid var(--gac-light);
    padding: 1.2rem 0;
    font-size: 0.85rem;
    background: #D8D5D0;
}

.footer-inner {
    text-align: center;
    color: var(--gac-grey);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 960px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
    }

    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .hero {
        padding: 2.2rem 0 2rem;
    }

    .hero-text h1 {
        font-size: 1.7rem;
    }

    .pillars-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================
   Bandeau admin
   ========================= */
.admin-topbar {
    width: 100%;
    background: #222;
    color: #fff;
    padding: 8px 20px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
}
.admin-topbar a {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}
.admin-topbar-spacer {
    height: 45px;
}

/* ======================
   BANDEAU ADMIN GLOBAL
   ====================== */
.admin-topbar {
    width: 100%;
    background: #1f1f1f;
    color: #fff;
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 1000000;
    border-bottom: 2px solid #ff8c00;
}

.admin-topbar-inner {
    max-width: 1300px;
    margin: auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.admin-topbar-nav a {
    margin: 0 0.8rem;
    color: #ffb347;
    text-decoration: none;
    font-weight: bold;
}

.admin-topbar-nav a:hover {
    color: #ffd28c;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-link {
    color: #ff8c00;
    text-decoration: none;
    font-weight: bold;
}

.logout-link:hover {
    color: #ffa94d;
}
/* ========= SECTION CONTACT ========= */

.contact-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: stretch;          /* les colonnes doivent s'étirer */
}

/* Les deux colonnes doivent accepter la hauteur du grid */
.contact-section-grid > div {
    height: 100%;
}

/* ========== COLONNE GAUCHE ========== */

.contact-left {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* wrapper contenant image + coordonnées */
.contact-image-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* conteneur de l’image */
.contact-image {
    flex: 1 1 auto;                /* remplit toute la hauteur disponible */
    height: 100%;                  /* essentiel */
    overflow: hidden;
    border-radius: 12px;
    min-height: 280px;
}

/* image responsive pleine hauteur */
.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;             /* couvre toute la colonne */
    display: block;
}

/* coordonnées sous l’image */
.contact-image-wrapper > div:not(.contact-image) {
    margin-top: 1rem;
}

/* ========== COLONNE DROITE ========== */

.contact-right {
    padding-top: 1px;              /* empêche margin collapse */
    height: 100%;
    display: flex;                 /* permet au formulaire d'étirer */
    flex-direction: column;
}

/* texte intro au-dessus du formulaire */
.contact-right > div:first-child {
    margin-bottom: 1rem;
}

/* formulaire */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-grow: 1;
}

.contact-form button {
    margin-top: auto;   /* pousse le bouton vers le bas du formulaire */
}
.contact-success {
    background: #c7eac4;
    border: 1px solid #8ac98a;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
    color: #2d572c;
    font-weight: 600;
}

/* champs formulaire */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* responsive */
@media (max-width: 900px) {

    .contact-section-grid {
        grid-template-columns: 1fr;
    }

    /* image sur mobile */
    .contact-image {
        height: 300px;
    }
}
