/* =============================================
   PAGE FIL DU TEMPS — STYLES SPÉCIFIQUES
   THÈME ROUGE BRIQUE / TERRACOTTA DOUX
   (même structure que Maison Bleue, décliné en rouge atténué)
============================================= */

:root {
    --fdt-bleu       : #952929;  /* rouge brique principal (ex-bleu) */
    --fdt-jean       : #C97B6A;  /* terracotta doux (ex-jean) */
    --fdt-jean-sombre: #A84B43;  /* brique moyen (ex-jean sombre) */
    --fdt-sable      : #EFE6D2;
    --fdt-sable-clair: #FCF9F4;
    --fdt-argile     : #F2B08D;
}

/* =============================================
   HEADER — même style que Maison Bleue
   (photo à gauche, texte à droite)
============================================= */
.header-fdt {
    /* dégradé doux : rosé/rouge clair en bas qui remonte vers le sable clair */
    background: linear-gradient(0deg, #a74f4f 0%, var(--fdt-sable-clair, #FCF9F4) 60%);
    padding: 40px 0 50px; /* Augmenté pour le badge sous la croix */
    position: relative;
    z-index: 1;
    overflow: visible;
    height: auto !important;
}

.header-fdt .section-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fdt-jean-sombre, #A84B43);
    margin-bottom: 10px;
}

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

.header-fdt .description {
    font-size: 1.02rem;
    line-height: 1.75;
    color: #4a3a3a;
    max-width: 540px;
    background-color: rgba(239,230,210,0.6);
    border-left: 4px solid var(--fdt-jean, #C97B6A);
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
}

/* =============================================
   FORME PHOTO HEADER
   — Croix de pharmacie (clip-path)
============================================= */
.cross-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 360px;
    padding-bottom: 30px; /* Espace pour le badge en bas */
    overflow: visible;
}

.cross-clip {
    width: min(300px, 75vw);
    height: min(300px, 75vw);
    clip-path: polygon(
        33.3% 0%,    66.6% 0%,
        66.6% 33.3%, 100% 33.3%,
        100% 66.6%,  66.6% 66.6%,
        66.6% 100%,  33.3% 100%,
        33.3% 66.6%, 0%   66.6%,
        0%   33.3%,  33.3% 33.3%
    );
    overflow: hidden;
    filter: drop-shadow(0 8px 28px rgba(149,41,41,0.28));
    transition: filter 0.3s ease;
}

.cross-clip:hover {
    filter: drop-shadow(0 12px 36px rgba(149,41,41,0.38));
}

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

.cross-clip:hover img {
    transform: scale(1.06);
}

.fdt-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--fdt-bleu, #952929);
    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 8px rgba(149,41,41,0.25);
}

/* ---- RESPONSIVE HEADER FIL DU TEMPS ---- */
@media (max-width: 991.98px) {
    .header-fdt {
        padding: 40px 0 50px;
    }
    .cross-wrapper {
        height: auto;
        min-height: 260px;
        padding-bottom: 30px; /* espace pour le badge */
        margin-bottom: 16px;
    }
    .header-fdt .description {
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .cross-wrapper {
        min-height: 220px;
    }
    .header-fdt h1 {
        font-size: 2rem;
    }
    .header-fdt .description {
        font-size: 0.95rem;
    }
}

/* =============================================
   BANDEAU CHIFFRES
============================================= */
.section-chiffres-fdt {
    background: var(--fdt-jean-sombre, #A84B43);
    padding: 40px 0;
    color: #FCF9F4;
    position: relative;
    z-index: 3; /* Passe au-dessus de la forme croix du header */
}

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

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

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

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

/* =============================================
   SECTION ÉQUIPEMENTS MÉDICAUX
   — cartes retournables (flip cards)
============================================= */
.section-equipements {
    background-color: var(--fdt-sable, #FCF9F4);
    padding: 70px 0;
}

.section-equipements .section-title {
    font-family: 'Newsreader', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--fdt-bleu, #952929);
    margin-bottom: 6px;
}

.section-equipements .section-hint {
    font-size: 0.92rem;
    color: var(--fdt-jean-sombre, #A84B43);
    margin-bottom: 40px;
}

.section-hint i {
    font-size: 1rem;
    margin-right: 4px;
}

.flip-card {
    perspective: 1200px;
    height: 300px;
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .flip-card {
        height: 260px;
    }
    .flip-card-back {
        padding: 20px 16px;
    }
    .flip-card-back h5 {
        font-size: 1rem;
    }
    .flip-card-back p {
        font-size: 0.82rem;
    }
    .flip-card-back .back-icon {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flip-card-front {
    background: #e8e4dc;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.flip-card-front .front-label {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(149,41,41,0.82);
    color: #FCF9F4;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 20px;
}

.flip-card-front .flip-hint {
    position: absolute;
    bottom: 10px;
    right: 12px;
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-back {
    background: linear-gradient(160deg, var(--fdt-bleu, #952929), var(--fdt-jean-sombre, #A84B43));
    color: #FCF9F4;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 24px;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.12);
}

.flip-card-back h5 {
    font-family: 'Newsreader', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #FCF9F4;
}

.flip-card-back p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: rgba(252,249,244,0.9);
    margin: 0;
}

.flip-card-back .back-icon {
    font-size: 2rem;
    margin-bottom: 14px;
    opacity: 0.6;
}

.flip-card-back .close-hint {
    margin-top: 16px;
    font-size: 0.78rem;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

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

.section-personnel .section-subtitle {
    font-size: 0.95rem;
    color: var(--fdt-jean-sombre, #A84B43);
    margin-bottom: 50px;
}

.staff-card {
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 18px rgba(149,41,41,0.08);
    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:hover {
    box-shadow: 0 10px 32px rgba(149,41,41,0.15);
    transform: translateY(-5px);
}

.staff-card .staff-color-band {
    height: 80px;
    width: 100%;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, var(--fdt-jean, #C97B6A), var(--fdt-bleu, #952929));
}

.staff-card .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);
    background: var(--fdt-jean-sombre, #A84B43);
    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 .staff-name {
    font-family: 'Newsreader', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fdt-bleu, #952929);
    margin: 14px 0 4px;
    padding: 0 16px;
}

.staff-card .staff-role {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fdt-jean-sombre, #A84B43);
    margin-bottom: 14px;
}

.staff-card .staff-divider {
    width: 40px;
    height: 2px;
    background: var(--fdt-jean, #C97B6A);
    margin: 0 auto 14px;
    border-radius: 2px;
}

.staff-card .staff-bio {
    font-size: 0.88rem;
    color: #6a5a5a;
    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 {
    display: inline-block;
    background-color: #F3DADA;
    color: var(--fdt-bleu, #952929);
    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 .staff-tag {
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================
   CTA BAS DE PAGE
============================================= */
.section-cta-fdt {
    background: linear-gradient(135deg, var(--fdt-jean-sombre, #A84B43), var(--fdt-bleu, #952929));
    padding: 60px 0;
    color: #FCF9F4;
    text-align: center;
}

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

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

.btn-sable-fdt {
    background-color: var(--fdt-sable, #EFE6D2);
    color: var(--fdt-bleu, #952929);
    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-fdt:hover {
    background-color: #FCF9F4;
    color: var(--fdt-bleu, #952929);
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* =============================================
   RESPONSIVE — MEDIA QUERIES (complément)
   Les règles ≤991px et ≤575px du header sont
   déjà définies plus haut. On complète ici
   pour les autres sections.
============================================= */

/* -----------------------------------------------
   TABLETTE (≤ 991px) — sections hors header
----------------------------------------------- */
@media (max-width: 991.98px) {

    .section-equipements,
    .section-infos-fdt,
    .section-cta-fdt {
        padding: 50px 0;
    }

    .section-chiffres-fdt {
        padding: 20px 0;
    }

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

    .chiffre-bloc-fdt {
        padding: 8px 12px;
    }

    .flip-card {
        height: 270px;
    }
}

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

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

    .header-fdt .description {
        max-width: 100%;
        border-left: none;
        border-top: 4px solid var(--fdt-jean, #C97B6A);
        border-radius: 0 0 6px 6px;
        padding: 14px 16px;
        text-align: left;
    }

    /* Croix : taille réduite */
    .cross-wrapper {
        height: auto;
        min-height: 200px;
        padding-bottom: 28px;
        margin-bottom: 12px;
    }

    /* Chiffres */
    .section-chiffres-fdt {
        padding: 16px 0;
    }

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

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

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

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

    /* Flip cards */
    .flip-card {
        height: 240px;
    }

    /* Infos */
    .section-infos-fdt {
        padding: 40px 0;
    }

    .info-card-fdt {
        padding: 22px 18px;
    }

    /* CTA */
    .section-cta-fdt {
        padding: 40px 0;
    }

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

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

    /* Équipements : titre */
    .section-equipements {
        padding: 40px 0;
    }

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

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

    .header-fdt {
        padding: 16px 0 28px;
    }

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

    .cross-wrapper {
        min-height: 180px;
    }

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

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

    .info-card-fdt {
        padding: 18px 14px;
    }

    .info-card-fdt .info-icon {
        font-size: 1.6rem;
    }

    .flip-card {
        height: 220px;
    }

    .flip-card-back {
        padding: 16px 14px;
    }

    .flip-card-back h5 {
        font-size: 0.95rem;
    }

    .flip-card-back p {
        font-size: 0.8rem;
    }

    .section-equipements .section-title {
        font-size: 1.4rem;
    }

    .section-infos-fdt h2,
    .section-cta-fdt h2 {
        font-size: 1.4rem !important;
    }
}