/* ============================================
   Ixila — Styles partages des pages internes
   ============================================ */

/* --- Page hero (titre de page) --- */
.page-hero {
    padding: clamp(6rem, 12vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
    background:
        radial-gradient(ellipse at 90% 0%, rgba(217, 79, 112, 0.08), transparent 60%),
        radial-gradient(ellipse at 10% 100%, rgba(43, 86, 114, 0.06), transparent 55%),
        var(--c-light);
    text-align: center;
}
.page-hero__title {
    font-family: var(--ff-display);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    color: var(--c-text);
    margin: 0 auto var(--sp-md);
    max-width: 900px;
}
.page-hero__subtitle {
    font-size: var(--fs-body-lg);
    color: var(--c-text-soft);
    max-width: 720px;
    margin: 0 auto;
    line-height: var(--lh-normal);
}

/* --- Variants : page hero avec video ou image de fond ---
   - --video  : about, notre-demarche, contact, offre (parent)
   - --image  : 7 sous-pages d'offre (fast, fast-roi, support-assistance, etc.)
   Note: double-classe .page-hero.page-hero--{video|image} pour gagner en specificite
   sur .page-hero--about/--demarche/etc. charges apres. */
.page-hero.page-hero--video,
.page-hero.page-hero--image {
    position: relative;
    overflow: hidden;
    min-height: clamp(380px, 55vh, 560px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a2030; /* fallback pendant le chargement de l'asset */
    padding: clamp(7rem, 14vw, 11rem) 0 clamp(4rem, 8vw, 6rem);
}
.page-hero__video,
.page-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.page-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(15, 25, 50, 0.30) 0%, rgba(15, 25, 50, 0.55) 100%);
    pointer-events: none;
}
.page-hero--video > .container,
.page-hero--image > .container {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%; /* force la pleine largeur dans le flex parent (ne pas shrink) */
}

/* --- Transition 3-vagues en bas du hero (home + toutes les pages internes) ---
   IMPORTANT : doit etre dans pages.css (loaded global), pas dans home.css,
   sinon les pages internes ont le SVG sans styling — il devient un flex item
   qui pousse le contenu du hero. */
.hero__waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px; /* evite la fine ligne d'aliasing */
    width: 100%;
    height: clamp(70px, 9vw, 140px);
    z-index: 2;
    display: block;
    color: var(--c-white); /* couleur par defaut = section suivante (blanc) */
    pointer-events: none;
}
/* Pic a droite (pages internes) — on miroite horizontalement le SVG */
.hero__waves--right {
    transform: scaleX(-1);
}
/* Couleurs par page (consigne Xavier : matchent le fond de la section apres) */
body:has(.hero--home) .hero__waves          { color: #E5EBFA; }
body:has(.page-hero--demarche) .hero__waves { color: #F5E9DC; }
/* about, offre (parent + sub), blog, contact restent en blanc (defaut) */

/* Le fond de la premiere section apres chaque hero matche la couleur de la vague
   pour une transition propre. Selecteur adjacent (+) = O(1). */
.hero--home + .section,
.page-hero--video + .section,
.page-hero--image + .section {
    background: var(--c-white);
}
.hero--home + .section { background: #E5EBFA; }
.page-hero--demarche + .section { background: #F5E9DC; }
.page-hero--video .page-hero__title,
.page-hero--image .page-hero__title {
    color: var(--c-white);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.20);
}
.page-hero--video .page-hero__subtitle,
.page-hero--image .page-hero__subtitle {
    color: rgba(255, 255, 255, 0.92);
}

/* Header transparent par-dessus le hero (effet immersif comme sur la home), avec
   un filet teinte foncé en haut pour garantir la lisibilité du menu blanc.
   Devient opaque au scroll via .is-scrolled (geree par app.js). */
body:has(.page-hero--video) .site-header.header--light:not(.is-scrolled),
body:has(.page-hero--image) .site-header.header--light:not(.is-scrolled) {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.18) 60%, rgba(0, 0, 0, 0) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}
body:has(.page-hero--video) .site-header.header--light:not(.is-scrolled) .nav__link,
body:has(.page-hero--video) .site-header.header--light:not(.is-scrolled) .lang-switcher__link,
body:has(.page-hero--image) .site-header.header--light:not(.is-scrolled) .nav__link,
body:has(.page-hero--image) .site-header.header--light:not(.is-scrolled) .lang-switcher__link {
    color: var(--c-white);
    font-weight: var(--fw-semibold);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
body:has(.page-hero--video) .site-header.header--light:not(.is-scrolled) .nav__link:hover,
body:has(.page-hero--video) .site-header.header--light:not(.is-scrolled) .nav__link--active,
body:has(.page-hero--image) .site-header.header--light:not(.is-scrolled) .nav__link:hover,
body:has(.page-hero--image) .site-header.header--light:not(.is-scrolled) .nav__link--active {
    color: var(--c-white);
}
body:has(.page-hero--video) .site-header.header--light:not(.is-scrolled) .header__logo-img,
body:has(.page-hero--image) .site-header.header--light:not(.is-scrolled) .header__logo-img {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.30));
}

/* Le hero doit s'etendre sous le header (offset main--inner annule) */
body:has(.page-hero--video) .main--inner,
body:has(.page-hero--image) .main--inner {
    padding-top: 0;
}

/* --- Section + variantes utilisees inter-pages --- */
.section__title {
    font-family: var(--ff-display);
    font-size: var(--fs-h2);
    color: var(--c-text);
    font-weight: 600;
}
.section--alt {
    background-color: var(--c-light);
}
.section__cta {
    text-align: center;
    margin-top: var(--sp-2xl);
}

/* --- Bloc de paragraphes (texte editorial) --- */
.prose {
    font-size: var(--fs-body-lg);
    line-height: var(--lh-normal);
    color: var(--c-text-soft);
}
.prose p {
    margin: 0 0 var(--sp-lg);
}
.prose p:last-child { margin-bottom: 0; }
.prose strong {
    color: var(--c-text);
    font-weight: var(--fw-semibold);
}
.prose em {
    font-style: italic;
    color: var(--c-text);
}
.prose a {
    color: var(--c-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.prose a:hover {
    color: var(--c-primary-dark);
}

/* --- CTA final (utilise sur plusieurs pages) --- */
.section--cta-final {
    background: linear-gradient(135deg, var(--c-secondary) 0%, var(--c-secondary-dark) 100%);
    color: var(--c-white);
    text-align: center;
}
.section--cta-final h2 {
    font-family: var(--ff-display);
    color: var(--c-white);
    font-size: var(--fs-h2);
    margin: 0 0 var(--sp-md);
}
.section--cta-final p {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-body-lg);
    margin: 0 0 var(--sp-2xl);
}
.section--cta-final .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-md);
    justify-content: center;
    align-items: center;
}
.section--cta-final .btn--outline {
    color: var(--c-white);
    border-color: var(--c-white);
}
.section--cta-final .btn--outline:hover {
    background: var(--c-white);
    color: var(--c-secondary);
}

/* --- Galerie clients (reutilisee home + notre-demarche) --- */
.clients-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--sp-lg);
    align-items: center;
    justify-items: center;
}
.client-tile {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-light);
    border-radius: var(--radius-md);
    padding: var(--sp-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.client-tile:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-sm);
}
.client-tile img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0.2);
    opacity: 0.85;
    transition: filter var(--transition-normal), opacity var(--transition-normal);
}
.client-tile:hover img {
    filter: grayscale(0);
    opacity: 1;
}
@media (max-width: 768px) {
    .clients-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .clients-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Btn block utility (pleine largeur) --- */
.btn--block {
    display: block;
    width: 100%;
    text-align: center;
}
