/* =============================================
   PAGE LES TILLEULS — STYLES SPÉCIFIQUES
============================================= */

:root {
    --til-vert       : #4A7A52;
    --til-vert-clair : #D6E8D8;
    --til-vert-doux  : #8FB896;
    --til-sable      : #EFE6D2;
    --til-bleu       : #005CA9;
    --til-jean       : #88A5BE;
}

/* =============================================
   HEADER — texte gauche, arbre droite
============================================= */
.header-tilleuls {
    background: linear-gradient(160deg, #e8f0e9 0%, var(--til-sable) 60%);
    padding: 40px 0 50px; /* grand espace pour l'arbre qui déborde en absolu (desktop) */
    position: relative;
    overflow: visible;
    z-index: 1;
    height: auto !important;
}



.header-tilleuls::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 80%, rgba(143,184,150,0.18) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(74,122,82,0.10) 0%, transparent 45%);
    pointer-events: none;
}

.header-tilleuls .section-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--til-vert, #4A7A52);
    margin-bottom: 10px;
}

.header-tilleuls h1 {
    font-family: 'Newsreader', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--til-vert, #4A7A52);
    margin-bottom: 18px;
    line-height: 1.15;
}

.header-tilleuls .description {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #3a4a3a;
    max-width: 540px;
    background-color: rgba(255,255,255,0.55);
    border-left: 4px solid var(--til-vert-doux, #8FB896);
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    backdrop-filter: blur(4px);
}

/* =============================================
   FORME ARBRE
============================================= */
.tree-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 340px;
    position: relative;
    z-index: 2;
    overflow: visible; /* Permet au badge de déborder sans être coupé */
}

/* Remplace le style="width:320px" inline pour pouvoir l'écraser en responsive */
.tree-wrapper-size {
    width: 320px;
}

.tree-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 110px;
    background: linear-gradient(to bottom, #8B6347, #5C3D1E);
    border-radius: 4px 4px 6px 6px;
    z-index: 1;
}

.tree-foliage {
    position: absolute;
    bottom: 95px;
    left: 50%;
    transform: translateX(-50%);
    width: 290px;
    height: 295px;
    clip-path: ellipse(50% 50% at 50% 50%);
    overflow: hidden;
    filter: drop-shadow(0 10px 28px rgba(74,122,82,0.28));
    z-index: 2;
}

.tree-foliage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transition: transform 0.6s ease;
}

.tree-foliage:hover img {
    transform: scale(1.05);
}

.tree-foliage-back {
    position: absolute;
    bottom: 155px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 140px;
    background: linear-gradient(160deg, var(--til-vert-clair), var(--til-vert-doux));
    clip-path: ellipse(50% 50% at 50% 50%);
    opacity: 0.55;
    z-index: 1;
}

.tree-badge {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--til-vert, #4A7A52);
    color: #FCF9F4;
    font-family: 'Newsreader', serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 6px 22px;
    border-radius: 30px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(74,122,82,0.3);
    z-index: 3;
}

/* =============================================
   BANDEAU CHIFFRES CLÉS
============================================= */
.section-chiffres {
    background: var(--til-vert, #4A7A52);
    padding: 20px 0 20px;
    color: #FCF9F4;
    position: relative;
    z-index: 10; /* Au-dessus du header sur tous les écrans */
}

.chiffre-bloc {
    text-align: center;
    padding: 10px 20px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.chiffre-bloc:last-child { border-right: none; }

.chiffre-bloc .chiffre-val {
    font-family: 'Newsreader', serif;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.chiffre-bloc .chiffre-label {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* =============================================
   INFOS PRATIQUES
============================================= */
.section-infos-til {
    background-color: #FCF9F4;
    padding: 65px 0;
}

.info-card-til {
    background: #fff;
    border: 1px solid #ddd8ce;
    border-top: 4px solid var(--til-vert-doux, #8FB896);
    border-radius: 8px;
    padding: 28px 24px;
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.info-card-til:hover {
    box-shadow: 0 6px 20px rgba(74,122,82,0.12);
    transform: translateY(-3px);
}

.info-card-til .info-icon {
    font-size: 2rem;
    color: var(--til-vert, #4A7A52);
    margin-bottom: 12px;
    background-color: #fff;
}

.info-card-til h5 {
    font-family: 'Newsreader', serif;
    color: var(--til-vert, #4A7A52);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.info-card-til p {
    font-size: 0.93rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* =============================================
   SECTION PROJET ÉDUCATIF
============================================= */
.section-projet-til {
    background-color: var(--til-sable, #EFE6D2);
    padding: 65px 0;
}

.projet-card-til {
    background: #fff;
    border-radius: 10px;
    padding: 32px 28px;
    height: 100%;
    border-bottom: 4px solid var(--til-vert-doux, #8FB896);
    box-shadow: 0 2px 12px rgba(74,122,82,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.projet-card-til:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(74,122,82,0.14);
}

.projet-card-til .projet-icon {
    font-size: 2.2rem;
    color: var(--til-vert, #4A7A52);
    margin-bottom: 16px;
}

.projet-card-til h5 {
    font-family: 'Newsreader', serif;
    color: var(--til-vert, #4A7A52);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.projet-card-til p {
    font-size: 0.92rem;
    color: #4a5568;
    line-height: 1.65;
    margin: 0;
}

/* =============================================
   SECTION PERSONNEL
============================================= */
.section-personnel-til {
    background-color: #FCF9F4;
    padding: 70px 0;
}

.section-personnel-til .section-title {
    font-family: 'Newsreader', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--til-vert, #4A7A52);
    margin-bottom: 8px;
}

.section-personnel-til .section-subtitle {
    font-size: 0.95rem;
    color: var(--til-vert-doux, #8FB896);
    margin-bottom: 50px;
}

.staff-card-til {
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 18px rgba(74,122,82,0.09);
    padding: 0 0 28px;
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;

    /* --- Hauteur égale pour toutes les cartes --- */
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.staff-card-til:hover {
    box-shadow: 0 10px 32px rgba(74,122,82,0.18);
    transform: translateY(-5px);
}

.staff-card-til .staff-color-band {
    height: 80px;
    width: 100%;
    border-radius: 12px 12px 0 0;
}

.staff-card-til .staff-avatar-initials {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid #fff;
    margin-top: -45px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    color: #FCF9F4;
    font-family: 'Newsreader', serif;
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.staff-card-til .staff-name {
    font-family: 'Newsreader', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--til-vert, #4A7A52);
    margin: 14px 0 4px;
    padding: 0 16px;
}

.staff-card-til .staff-role {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--til-vert-doux, #8FB896);
    margin-bottom: 14px;
}

.staff-card-til .staff-divider {
    width: 40px;
    height: 2px;
    background: var(--til-vert-doux, #8FB896);
    margin: 0 auto 14px;
    border-radius: 2px;
}

.staff-card-til .staff-bio {
    font-size: 0.88rem;
    color: #5a6a5a;
    line-height: 1.6;
    padding: 0 20px;

    /* --- La bio occupe l'espace restant et pousse le tag en bas --- */
    flex: 1 1 auto;
}

.staff-tag-til {
    display: inline-block;
    background-color: var(--til-vert-clair, #D6E8D8);
    color: var(--til-vert, #4A7A52);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: 12px;
}

/* --- Le tag reste centré et collé en bas de chaque carte --- */
.staff-card-til .staff-tag-til {
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================
   CTA
============================================= */
.section-cta-til {
    background: linear-gradient(135deg, var(--til-vert, #4A7A52), #2e5234);
    padding: 60px 0;
    color: #FCF9F4;
    text-align: center;
}

.section-cta-til h2 {
    font-family: 'Newsreader', serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-cta-til p {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 28px;
}

.btn-sable-til {
    background-color: var(--til-sable, #EFE6D2);
    color: var(--til-vert, #4A7A52);
    font-weight: 700;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-sable-til:hover {
    background-color: #FCF9F4;
    color: var(--til-vert, #4A7A52);
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* =============================================
   RESPONSIVE — MEDIA QUERIES
============================================= */

/* -----------------------------------------------
   TABLETTE (≤ 991px)
   Sur tablette/mobile, Bootstrap empile les colonnes.
   L'arbre passe dans le flux → on supprime le grand
   padding-bottom qui était là pour lui faire de la place.
----------------------------------------------- */
@media (max-width: 991.98px) {

    /* Header : flow normal, plus de grand padding-bottom */
    .header-tilleuls {
        padding: 30px 0 40px;
        overflow: hidden; /* coupe les débordements éventuels */
    }

    /* L'arbre dans le flux : on le centre et on fixe une hauteur raisonnable */
    .tree-wrapper {
        height: 260px;
        margin: 0 auto 28px;
    }
    .tree-wrapper-size {
        width: 240px;
    }

    .tree-foliage {
        width: 220px;
        height: 225px;
        bottom: 75px;
    }

    .tree-foliage-back {
        width: 140px;
        height: 110px;
        bottom: 120px;
    }

    .tree-trunk {
        width: 44px;
        height: 85px;
    }

    /* Section chiffres : 2 blocs par ligne */
    .chiffre-bloc {
        padding: 8px 12px;
    }

    .chiffre-bloc .chiffre-val {
        font-size: 2rem;
    }

    /* Sections : padding réduit */
    .section-infos-til,
    .section-projet-til,
    .section-personnel-til {
        padding: 50px 0;
    }

    .section-cta-til {
        padding: 50px 0;
    }
}

/* -----------------------------------------------
   MOBILE (≤ 767px)
----------------------------------------------- */
@media (max-width: 767.98px) {

    /* Header */
    .header-tilleuls {
        padding: 20px 0 32px;
        text-align: center;
        overflow: hidden;
    }

    .header-tilleuls h1 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .header-tilleuls .description {
        max-width: 100%;
        font-size: 0.97rem;
        border-left: none;
        border-top: 4px solid var(--til-vert-doux, #8FB896);
        border-radius: 0 0 6px 6px;
        padding: 14px 16px;
        text-align: left;
    }

    .header-tilleuls .section-eyebrow {
        font-size: 0.72rem;
    }

    /* Arbre : encore plus petit sur mobile */
    .tree-wrapper {
        height: 220px;
        margin: 0 auto 20px;
    }
    .tree-wrapper-size {
        width: 200px;
    }

    .tree-foliage {
        width: 190px;
        height: 195px;
        bottom: 65px;
    }

    .tree-foliage-back {
        width: 120px;
        height: 95px;
        bottom: 105px;
    }

    .tree-trunk {
        width: 38px;
        height: 70px;
    }

    .tree-badge {
        font-size: 0.78rem;
        padding: 5px 16px;
    }

    /* Bandeau chiffres : 2 colonnes */
    .section-chiffres {
        padding: 16px 0;
    }

    .chiffre-bloc {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding: 10px 8px;
    }

    .chiffre-bloc:last-child {
        border-bottom: none;
    }

    .chiffre-bloc .chiffre-val {
        font-size: 1.8rem;
    }

    .chiffre-bloc .chiffre-label {
        font-size: 0.75rem;
    }

    /* Sections : padding mobile */
    .section-infos-til,
    .section-projet-til,
    .section-personnel-til {
        padding: 40px 0;
    }

    .section-cta-til {
        padding: 40px 0;
    }

    /* Cards infos & projet : pleine largeur */
    .info-card-til,
    .projet-card-til {
        padding: 22px 18px;
    }

    /* Staff cards */
    .staff-card-til {
        max-width: 340px;
        margin-left: auto;
        margin-right: auto;
    }

    .section-personnel-til .section-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .section-personnel-til .section-subtitle {
        font-size: 0.88rem;
        margin-bottom: 32px;
    }

    /* CTA */
    .section-cta-til h2 {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
    }

    .section-cta-til p {
        font-size: 0.93rem;
    }

    .btn-sable-til {
        padding: 10px 26px;
        font-size: 0.9rem;
    }
}

/* -----------------------------------------------
   TRÈS PETIT MOBILE (≤ 480px)
----------------------------------------------- */
@media (max-width: 480px) {

    .header-tilleuls {
        padding: 20px 0 30px;
    }

    .header-tilleuls h1 {
        font-size: 1.55rem;
        margin-bottom: 12px;
    }

    .tree-wrapper {
        height: 190px;
    }
    .tree-wrapper-size {
        width: 170px;
    }

    .tree-foliage {
        width: 160px;
        height: 165px;
        bottom: 55px;
    }

    .tree-foliage-back {
        width: 100px;
        height: 80px;
        bottom: 90px;
    }

    .tree-trunk {
        width: 32px;
        height: 60px;
    }

    /* Chiffres en colonne unique */
    .chiffre-bloc .chiffre-val {
        font-size: 1.5rem;
    }

    .chiffre-bloc .chiffre-label {
        font-size: 0.7rem;
    }

    /* Cartes */
    .info-card-til,
    .projet-card-til {
        padding: 18px 14px;
    }

    .info-card-til .info-icon,
    .projet-card-til .projet-icon {
        font-size: 1.6rem;
    }

    /* Staff avatar */
    .staff-card-til .staff-avatar-initials {
        width: 75px;
        height: 75px;
        font-size: 1.3rem;
        margin-top: -38px;
    }

    .staff-card-til .staff-color-band {
        height: 65px;
    }

    .staff-card-til .staff-name {
        font-size: 0.97rem;
    }

    .staff-card-til .staff-bio {
        font-size: 0.82rem;
    }

    /* Section titres inline */
    .section-infos-til h2,
    .section-projet-til h2 {
        font-size: 1.4rem !important;
    }
}