/*
 * Hero de la page d'accueil : carrousel des domaines d'expertise + accès rapides.
 * Chargé uniquement par front/index.html.twig, après slide.css.
 */
.hero {
    --hero-brand: #00b2ad;
    --hero-brand-dark: #008f8b;
    --hero-ink: #0d2a2e;
    --hero-h: 560px;
    position: relative;
    border-radius: 0 0 18px 18px;
    overflow: hidden;
    background: var(--hero-ink);
    isolation: isolate;
}
@media (max-width: 1199px) { .hero { --hero-h: 480px; } }
@media (max-width: 767px)  { .hero { --hero-h: 460px; border-radius: 0; } }

/* ---------- Diapositive ---------- */
.hero-slide {
    position: relative;
    height: var(--hero-h);
    overflow: hidden;
}
.hero .owl-carousel .owl-item img.hero-img,
.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    transform: scale(1.06);
    transition: transform 7s ease-out;
}
.hero .owl-item.active .hero-img { transform: scale(1); } /* léger zoom arrière pendant l'affichage */

/* Voile : lisibilité du texte à gauche, photo visible à droite */
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(6, 37, 41, .92) 0%, rgba(6, 37, 41, .72) 38%, rgba(6, 37, 41, .15) 75%, rgba(6, 37, 41, 0) 100%),
        linear-gradient(0deg, rgba(6, 37, 41, .55) 0%, rgba(6, 37, 41, 0) 35%);
}

/* ---------- Texte ---------- */
.hero-content {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(600px, 56%);
    padding: 0 0 40px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
    text-align: left;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
}
.hero-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hero-brand);
    box-shadow: 0 0 0 4px rgba(0, 178, 173, .3);
}
.hero-title {
    margin: 18px 0 14px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.01em;
    color: #fff;
    text-align: left;
}
.hero-text {
    text-align: left;
    margin: 0 0 28px;
    max-width: 480px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .86);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.hero .hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.hero .hero-btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s; }
.hero .hero-btn-primary {
    background: var(--hero-brand);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 178, 173, .35);
}
.hero .hero-btn-primary:hover,
.hero .hero-btn-primary:focus-visible {
    background: var(--hero-brand-dark);
    color: #fff;
    transform: translateY(-2px);
}
.hero .hero-btn-primary:hover svg { transform: translateX(3px); }
.hero .hero-btn-ghost {
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}
.hero .hero-btn-ghost:hover,
.hero .hero-btn-ghost:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--hero-ink);
}
.hero .hero-btn:focus-visible { outline: 3px solid rgba(255, 255, 255, .7); outline-offset: 3px; }

/* Entrée du texte à chaque changement de diapositive */
.hero .owl-item .hero-content > * { opacity: 0; transform: translateY(18px); }
.hero .owl-item.active .hero-content > * {
    opacity: 1;
    transform: none;
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.hero .owl-item.active .hero-content > :nth-child(2) { transition-delay: .12s; }
.hero .owl-item.active .hero-content > :nth-child(3) { transition-delay: .24s; }
.hero .owl-item.active .hero-content > :nth-child(4) { transition-delay: .36s; }

/* ---------- Navigation ---------- */
.hero .owl-nav > div {
    top: auto;
    bottom: 56px;
    left: auto;
    right: 112px;
    z-index: 3;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 16px;
    transition: background-color .2s, border-color .2s;
}
.hero .owl-nav > div.owl-next { right: 56px; }
.hero .owl-nav > div:hover { background: var(--hero-brand); border-color: var(--hero-brand); }
.hero .owl-dots {
    position: absolute;
    z-index: 3;
    left: 64px;
    bottom: 64px;
    display: flex;
    gap: 8px;
}
.hero .owl-dots .owl-dot span {
    display: block;
    width: 10px;
    height: 10px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    transition: width .3s, background-color .3s;
}
.hero .owl-dots .owl-dot.active span { width: 30px; background: #fff; }
.hero .owl-dots .owl-dot:hover span { background: #fff; }

/* ---------- Accès rapides (sous le carrousel) ---------- */
.hero-quick {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: -34px 32px 10px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(13, 42, 46, .12), 0 2px 6px rgba(13, 42, 46, .06);
    overflow: hidden;
    text-align: left; /* le thème justifie le texte par défaut */
}
.hero-quick a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    color: var(--hero-ink, #0d2a2e);
    text-decoration: none;
    transition: background-color .2s;
}
.hero-quick a + a { border-left: 1px solid #e6eef0; }
.hero-quick a:hover,
.hero-quick a:focus-visible { background: #f0fafa; }
.hero-quick-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e6f7f6;
    color: #00908c;
    transition: background-color .2s, color .2s;
}
.hero-quick a:hover .hero-quick-icon { background: #00b2ad; color: #fff; }
.hero-quick-icon svg { width: 22px; height: 22px; }
.hero-quick-urgent .hero-quick-icon { background: #fdecec; color: #d4383d; }
.hero-quick-urgent:hover .hero-quick-icon { background: #d4383d !important; }
.hero-quick strong {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #0d2a2e;
    line-height: 1.3;
}
.hero-quick small {
    display: block;
    margin-top: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    color: #5f7377;
    line-height: 1.4;
}

/* ---------- Tablette ---------- */
@media (max-width: 1199px) {
    .hero-content { padding-left: 44px; width: min(560px, 64%); }
    .hero .owl-dots { left: 44px; }
    .hero-quick { grid-template-columns: repeat(2, 1fr); }
    .hero-quick a:nth-child(3) { border-left: 0; }
    .hero-quick a:nth-child(n+3) { border-top: 1px solid #e6eef0; }
}

/* ---------- Mobile : texte en bas, voile vertical ---------- */
@media (max-width: 767px) {
    .hero-slide::after {
        background: linear-gradient(0deg, rgba(6, 37, 41, .95) 0%, rgba(6, 37, 41, .7) 45%, rgba(6, 37, 41, .1) 80%);
    }
    .hero-content {
        width: 100%;
        top: auto;
        padding: 0 22px 78px;
        justify-content: flex-end;
    }
    .hero-title { font-size: 30px; margin: 14px 0 10px; }
    .hero-text { font-size: 14.5px; -webkit-line-clamp: 2; margin-bottom: 20px; }
    .hero .hero-btn { padding: 12px 18px; font-size: 13.5px; }
    .hero .owl-dots { left: 22px; bottom: 36px; }
    .hero .owl-nav { display: none; } /* balayage tactile */
    .hero-quick {
        margin: 14px 12px 6px;
        grid-template-columns: 1fr 1fr;
        border-radius: 14px;
    }
    .hero-quick a { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
    .hero-quick a + a { border-left: 1px solid #e6eef0; }
    .hero-quick a:nth-child(3) { border-left: 0; }
    .hero-quick-icon { width: 38px; height: 38px; border-radius: 10px; }
    .hero-quick strong { font-size: 13px; }
    .hero-quick small { font-size: 12px; }
}

/* Texte réservé aux lecteurs d'écran (libellés des flèches) */
.hero .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .hero-img,
    .hero .owl-item .hero-content > *,
    .hero .hero-btn { transition: none !important; transform: none !important; }
    .hero .owl-item .hero-content > * { opacity: 1; }
}
