/* ==========================================================================
   1. DESIGN TOKENS (Variables CSS extraites de la maquette)
   ========================================================================== */
:root {
  /* Bleus */
  --blue-900: #0B1F3D;   /* titre H1 ligne 1, titres de carte */
  --blue-700: #003E9A;   /* "FYLE", logo, texte bouton secondaire */
  --blue-600: #0049B1;   /* remplissage boutons + CTA header */
  --blue-band: #034BA5;  /* bande bleue du bas */

  /* Verts */
  --green-600: #4E9A3F;  /* "CLINIQUE", logo, icônes vertes */
  --green-400: #6AA864;  /* trait/ECG sous le H1 */

  /* Neutres */
  --ink: #16223F;        /* paragraphe hero */
  --ink-soft: #334155;   /* corps de texte des cartes */
  --white: #FFFFFF;
  --on-blue-soft: #D4E5F4; /* sous-titres dans la bande bleue */

  /* Surfaces */
  --card: #FFFFFF;
  --icon-green-bg: #EEF4EB;  /* pastille icône carte 1 & 3 */
  --icon-blue-bg: #ECF3FB;   /* pastille icône carte 2 */

  /* Rayons */
  --r-card: 20px;
  --r-btn: 12px;
  --r-pill: 999px;

  /* Ombres */
  --shadow-card: 0 10px 30px rgba(2,60,140,.10), 0 2px 6px rgba(2,60,140,.06);
  
  /* Layout */
  --container: min(1331px, 100% - 160px);
}

/* ==========================================================================
   RESET & FONDATIONS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   2. LE HEADER
   ========================================================================== */
.hdr {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 0 80px; /* Gouttière latérale mesurée à 80px */
    height: 130px;
    background: #fff;
    position: relative;
    z-index: 50;
    max-width: 1491px; /* Limite la largeur de la maquette pour reproduire l'effet */
    margin-inline: auto;
}

/* --- Bloc Logo --- */
.hdr__logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hdr__logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
}

.hdr__logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 46px;
    line-height: 0.95;
    letter-spacing: -1px;
}

.wordmark-fyle {
    color: var(--blue-700);
}

.wordmark-clinique {
    color: var(--green-600);
}

/* La tagline déborde volontairement à gauche du texte comme précisé dans l'analyse */
.hdr__tagline {
    position: absolute;
    bottom: -20px;
    left: -5px; /* Décalage pour démarrer avant le mot FYLE, sous le logo */
    font-size: 14px;
    color: var(--blue-700);
    white-space: nowrap;
    font-weight: 500;
}

/* --- Navigation --- */
.hdr__nav {
    margin-left: auto;
    display: flex;
    gap: 52px;
    font-size: 17px;
    font-weight: 500;
}

.hdr__nav a {
    position: relative;
    padding-block: 10px;
    color: var(--blue-900);
    padding-inline: 8px; /* Correction asymétrie: un padding symétrique pour la bordure active */
}

.hdr__nav a[aria-current] {
    color: var(--blue-600);
}

.hdr__nav a[aria-current]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--blue-600);
    border-radius: 2px;
}

/* --- Bouton CTA --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn--pill {
    height: 45px;
    padding: 0 24px;
    border-radius: var(--r-pill);
    background: var(--blue-600);
    color: var(--white);
    font-size: 16px;
}

.btn--pill svg {
    width: 15px;
    height: 15px;
}

/* ==========================================================================
   3. SECTION HERO (Archi 5 couches)
   ========================================================================== */
.hero-section {
    position: relative;
    isolation: isolate;
    overflow: hidden; /* Empêche le disque géant et l'image des soignants de déborder */
    /* La hauteur va être déterminée par le contenu (texte) et l'image */
    padding-bottom: 270px; /* Laisse descendre le background pour qu'il passe sous les cartes */
}
.hero {
    position: relative;
    max-width: 1491px;
    margin-inline: auto;
    height: 100%;
}

/* --- Vague du Haut --- */
.hero__topwave {
    position: absolute;
    inset: 0 0 auto 0;
    width: 100%;
    height: 20px;
    z-index: 40;
    display: block;
}

/* --- Couche 0 : Image de fond --- */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
    filter: blur(6px) saturate(.8) brightness(1.06);
    transform: scale(1.06); /* Mange le halo du blur */
}

.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.15) 55%, rgba(255,255,255,.30));
}

/* --- Couche 1 : Croix décorative --- */
.hero__cross-deco {
    position: absolute;
    top: 39px; /* 169 - 130 (hauteur header) */
    right: -35px; /* Déborde volontairement à droite */
    z-index: 1;
}

/* --- Couche 2 : Le grand disque clair --- */
.hero__panel {
    position: absolute;
    z-index: 2;
    width: 2520px;
    height: 2520px;         
    left: -1820px;          
    top: -950px;            
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,.97) 0%, rgba(240,247,255,.90) 60%, rgba(232,241,252,.86) 100%);
    pointer-events: none;
    backdrop-filter: blur(2px);
}

/* --- Couche 3 : Contenu Textuel --- */
.hero__content {
    position: relative;
    z-index: 3;
    padding-top: 60px; /* Réduit pour compresser verticalement */
    padding-left: 85px; /* Aligné avec la marge de 80px + offset optique */
    width: 50%;
}

.hero__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 56px; /* Réduit pour s'adapter à la longueur du texte */
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.015em;
    color: var(--blue-900);
}

.t-blue { color: var(--blue-700); }
.t-green { color: var(--green-600); }

.pulse {
    margin-top: 16px; /* Réduit pour compresser */
    display: block;
}

.hero__lead {
    max-width: 30ch;
    font-size: 22px;
    line-height: 1.4;
    color: var(--ink); /* Correction de couleur appliquée ici */
    margin: 16px 0 28px; /* Réduit pour compresser */
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: 29px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 19px;
    font-weight: 600;
    text-decoration: none;
}

.btn--primary {
    background: var(--blue-600);
    color: #fff;
    padding: 0 32px 0 24px;
}

.btn--primary .btn__ico {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,.18);
}

.btn--ghost {
    background: #fff;
    color: var(--blue-700);
    box-shadow: inset 0 0 0 2px var(--blue-700);
    padding: 0 32px 0 24px;
}

.btn__ico-ghost {
    color: var(--blue-600);
}

/* --- Couche 4 : L'image des médecins --- */
.hero__people {
    position: absolute;
    z-index: 4;
    right: 0;
    top: -30px; /* Remonté pour suivre la réduction du titre */
    height: min(720px, 68vw);
    width: auto;
    max-width: none;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 12px 30px rgba(2,40,90,.18));
}

/* ==========================================================================
   4. LES CARTES DE SERVICES (Features)
   ========================================================================== */
.cards-section {
    max-width: 1491px;
    margin-inline: auto;
    margin-top: -240px; /* Remonte fortement les cartes par-dessus l'arrière-plan du hero */
}

.cards {
    margin-bottom: -63px;
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    /* Container : 109 → 1368 = 1259 px. Marge de gauche 109px */
    padding: 0 calc(1491px - 1368px) 0 109px; 
}

.card {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: 24px;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 20px;
    align-items: center;
    min-height: 185px;
}

.card__ico {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--icon-green-bg);
}

.card__ico--blue {
    background: var(--icon-blue-bg);
}

.card__content {
    display: flex;
    flex-direction: column;
}

.card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--blue-900);
    margin-bottom: 8px; /* space before body */
}

.card__text {
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.card__bar {
    width: 50px;
    height: 4px;
    border-radius: 2px;
    background: var(--green-600);
    margin-top: 14px;
}

.card:nth-child(2) .card__bar {
    background: var(--blue-600);
}

/* ==========================================================================
   5. LA BANDE BLEUE (Trust)
   ========================================================================== */
.band-section {
    position: relative;
    z-index: 5;
    background: #034BA5;
}
.band {
    padding: 60px 80px 40px;
    max-width: 1491px;
    margin-inline: auto;
}

.band__top {
    position: absolute;
    left: 0;
    right: 0;
    top: -80px;
    width: 100%;
    height: 80px;
    display: block;
}

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

.trust {
    display: flex;
    align-items: center;
    gap: 18px;
}

.trust__ico {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    display: grid;
    place-items: center;
}

.trust__content {
    display: flex;
    flex-direction: column;
}

.trust__t {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.trust__s {
    font-size: 14px;
    color: rgba(255,255,255,.85);
}

/* ==========================================================================
   7. SECTION FONCTIONNALITÉS (Bento Box)
   ========================================================================== */
.features-section {
    background: #F8FAFC;
}
.features {
    padding: 120px 80px 80px;
    max-width: 1491px;
    margin-inline: auto;
}

.features__header {
    text-align: center;
    margin-bottom: 64px;
    max-width: 700px;
    margin-inline: auto;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--blue-900);
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
}

.section-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink-soft);
}

.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
}

.bento__item {
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(2,60,140,0.08);
}

.bento__item--large {
    grid-column: span 2;
    grid-row: span 2;
    padding: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #fff 0%, #f0f7ff 100%);
}

.bento__item--large .bento__content {
    padding: 40px;
    max-width: 80%;
}

.bento__item--wide {
    grid-column: span 3;
}

.bento__content--row {
    display: flex;
    align-items: center;
    gap: 32px;
}

.bento__ico {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--icon-green-bg);
    color: var(--green-600);
    display: grid;
    place-items: center;
    margin-bottom: 24px;
}

.bento__ico svg {
    width: 28px;
    height: 28px;
}

.bento__ico--blue {
    background: var(--icon-blue-bg);
    color: var(--blue-600);
}

.bento__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--blue-900);
    margin-bottom: 12px;
}

.bento__text {
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.bento__visual {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 60%;
    height: 60%;
    background: #fff;
    border-radius: 20px 0 0 0;
    box-shadow: -10px -10px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 20px;
}

.mock-ui {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mock-ui__hdr {
    height: 30px;
    border-radius: 8px;
    background: #f1f5f9;
    width: 100%;
}

.mock-ui__body {
    display: flex;
    gap: 16px;
}

.mock-ui__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--icon-blue-bg);
}

.mock-ui__lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.mock-ui__lines span {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}
.mock-ui__lines span:nth-child(1) { width: 80%; background: var(--blue-600); }
.mock-ui__lines span:nth-child(2) { width: 60%; }
.mock-ui__lines span:nth-child(3) { width: 40%; }

/* ==========================================================================
   8. CHIFFRES CLÉS (Metrics)
   ========================================================================== */
.metrics {
    background: #fff;
    padding: 100px 80px;
    max-width: 1491px;
    margin-inline: auto;
}

.metrics__inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 60px 0;
}

.metric {
    text-align: center;
}

.metric__num {
    font-family: 'Montserrat', sans-serif;
    font-size: 56px;
    font-weight: 800;
    color: var(--blue-700);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.metric__label {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink-soft);
}

/* ==========================================================================
   9. CTA PRE-FOOTER
   ========================================================================== */
.cta-section {
    padding: 0 80px 100px;
    max-width: 1491px;
    margin-inline: auto;
    background: #fff;
}

.cta-card {
    background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-600) 100%);
    border-radius: 32px;
    padding: 80px 40px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,73,177,0.25);
}

.cta-card::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -300px;
    right: -200px;
    pointer-events: none;
}

.cta-card__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.cta-card__text {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

.cta-card__btn {
    position: relative;
    z-index: 2;
    height: 56px;
    border-radius: 12px;
}

/* ==========================================================================
   10. FOOTER NOIR
   ========================================================================== */
.footer {
    background: #061121; /* Très sombre, presque noir carbone */
    color: #94a3b8;
    padding: 80px 80px 40px;
    font-size: 15px;
}

.footer__inner {
    max-width: 1331px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer__desc {
    margin-bottom: 32px;
    line-height: 1.6;
    max-width: 320px;
}

.footer__socials {
    display: flex;
    gap: 16px;
}

.footer__socials a {
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: grid;
    place-items: center;
    transition: background 0.2s;
}

.footer__socials a:hover {
    background: var(--green-600);
}

.footer__title {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 24px;
}

.footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer__links a {
    transition: color 0.2s;
}

.footer__links a:hover {
    color: var(--green-400);
}

.footer__bottom {
    max-width: 1331px;
    margin-inline: auto;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

/* ==========================================================================
   11. RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 1279px) {
    .hero__title {
        font-size: 48px; /* Ajusté pour tablette */
    }
    .hero__panel {
        /* On adapte un peu le disque pour les tablettes larges */
        width: 2200px;
        height: 2200px;
        left: -1600px;
    }
    .hero__people {
        height: 560px;
    }
    .cards {
        padding: 0 40px; /* On réduit les marges latérales */
    }
    .card {
        padding: 20px;
        grid-template-columns: 88px 1fr;
        gap: 16px;
    }
    .card__ico {
        width: 88px;
        height: 88px;
    }
}

@media (max-width: 1023px) {
    .hdr {
        padding: 0 40px;
        gap: 20px;
    }
    .hdr__nav {
        gap: 20px;
    }
    .hero__panel {
        /* Disque plein largeur sans radius */
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.92);
    }
    .hero__content {
        width: 100%;
        padding-left: 40px;
        padding-right: 40px;
        position: relative;
        z-index: 5;
    }
    .hero__people {
        max-height: 420px;
        z-index: 4;
        right: 10%;
        opacity: 0.8;
    }
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .band__inner {
        flex-wrap: wrap;
    }
    .trust {
        width: calc(50% - 16px);
    }
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento__item--large {
        grid-column: span 2;
    }
    .bento__item--wide {
        grid-column: span 2;
    }
    .footer__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .hdr {
        padding: 0 20px;
        height: 80px;
    }
    .hdr__nav {
        display: none; /* Remplacer par un menu burger en vrai JS */
    }
    .hdr__tagline {
        display: none;
    }
    .btn--pill {
        margin-left: auto;
    }
    .hero__topwave, .band__top {
        height: 10px; /* Aplatir les vagues */
    }
    .band__top {
        top: -10px;
    }
    .hero__content {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 40px;
    }
    .hero__title {
        font-size: 36px;
        line-height: 1.15;
    }
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .cards {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    .card {
        grid-template-columns: 1fr;
        text-align: center;
        place-items: center;
    }
    .card__ico {
        margin: 0 auto;
    }
    .band {
        padding: 40px 20px 30px;
    }
    .trust {
        width: 100%;
    }
    .features {
        padding: 60px 20px;
    }
    .bento {
        grid-template-columns: 1fr;
    }
    .bento__item--large, .bento__item--wide {
        grid-column: span 1;
    }
    .bento__content--row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .metrics {
        padding: 60px 20px;
    }
    .metrics__inner {
        flex-direction: column;
        gap: 40px;
    }
    .cta-section {
        padding: 0 20px 60px;
    }
    .cta-card {
        padding: 40px 20px;
    }
    .cta-card__title {
        font-size: 28px;
    }
    .footer {
        padding: 60px 20px 30px;
    }
    .footer__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
