/**
 * Accueil AHS — rendu institutionnel : peu d’ombres, angles nets, lisibilité.
 */
:root {
    --ahs-home-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ahs-line: rgba(15, 72, 142, 0.14);
    --ahs-line-strong: rgba(15, 72, 142, 0.22);
    /* Plein écran : hauteur de la fenêtre (dynamic viewport sur mobile). */
    --ahs-hero-height: 100vh;
}

@supports (height: 100dvh) {
    :root {
        --ahs-hero-height: 100dvh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ahs-home *,
    .ahs-home *::before,
    .ahs-home *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.ahs-home {
    overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
    html:has(.ahs-home) {
        scroll-behavior: smooth;
    }
}

.ahs-home section {
    scroll-margin-top: 6rem;
}

/* Hero */
.ahs-hero {
    position: relative;
}

.ahs-hero-carousel.carousel-fade .carousel-item {
    transition-property: opacity;
    transition-duration: 0.75s;
    transition-timing-function: var(--ahs-home-ease);
}

.ahs-hero-carousel .carousel-inner {
    border-radius: 0;
    overflow: hidden;
    height: var(--ahs-hero-height);
}

#header-carousel.ahs-hero-carousel {
    height: var(--ahs-hero-height);
}

/* Hauteur réelle du hero : l’image ne doit plus imposer sa hauteur intrinsèque (#header-carousel ex-style.css écrasait home.css). */
#header-carousel.ahs-hero-carousel .carousel-item {
    position: relative;
    height: var(--ahs-hero-height);
    min-height: var(--ahs-hero-height);
}

#header-carousel.ahs-hero-carousel .carousel-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#header-carousel.ahs-hero-carousel .carousel-caption {
    z-index: 2;
}

.ahs-hero .carousel-caption {
    background: linear-gradient(
        120deg,
        rgba(15, 72, 142, 0.88) 0%,
        rgba(15, 72, 142, 0.62) 50%,
        rgba(15, 72, 142, 0.45) 100%
    );
    padding: 2rem 1.25rem 3.5rem;
}

@media (min-width: 768px) {
    .ahs-hero .carousel-caption {
        padding: 2.75rem 2rem 4.25rem;
    }
}

.ahs-hero-kicker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #faad21;
    margin-bottom: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0;
    background: rgba(15, 72, 142, 0.35);
    border: 1px solid rgba(250, 173, 33, 0.45);
}

.ahs-hero-title {
    font-family: "Jost", sans-serif;
    font-weight: 700;
    line-height: 1.12;
    color: #faad21;
    max-width: 20ch;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .ahs-hero-title {
        font-size: clamp(1.75rem, 3.6vw, 2.65rem);
        max-width: 24ch;
    }
}

.ahs-hero-lead {
    color: rgba(250, 173, 33, 0.94);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.025rem;
    line-height: 1.55;
}

.ahs-hero-actions {
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ahs-hero-actions .btn {
    min-height: 46px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    border-radius: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.ahs-hero-actions .btn:focus-visible {
    outline: 2px solid #faad21;
    outline-offset: 2px;
}

.ahs-hero-actions .btn-primary:hover,
.ahs-hero-actions .btn-outline-light:hover {
    transform: none;
    box-shadow: none;
}

.ahs-hero .carousel-indicators {
    margin-bottom: 1rem;
    gap: 0;
}

.ahs-hero .carousel-indicators [type="button"] {
    width: 2rem;
    height: 3px;
    border-radius: 0;
    border: none;
    margin: 0 3px;
    background-color: rgba(250, 173, 33, 0.35);
    opacity: 1;
    transition: background-color 0.2s;
}

.ahs-hero .carousel-indicators [type="button"].active {
    background-color: #faad21;
    transform: none;
}

.ahs-hero .carousel-control-prev,
.ahs-hero .carousel-control-next {
    width: min(11%, 3.5rem);
    opacity: 0.9;
}

.ahs-hero .carousel-control-prev-icon,
.ahs-hero .carousel-control-next-icon {
    border-radius: 0;
    border-width: 6px;
}

.ahs-scroll-hint {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #faad21;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    pointer-events: none;
    opacity: 0.85;
}

.ahs-scroll-hint__icon {
    animation: ahs-bounce 2.4s ease-in-out infinite;
}

@keyframes ahs-bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

@media (max-width: 767.98px) {
    .ahs-scroll-hint {
        display: none;
    }
}

/* Bandeau 3 atouts — sous le carousel, sans chevauchement */
.top-feature.ahs-feature-wrap {
    margin-top: clamp(1.25rem, 3vw, 2rem);
    position: relative;
    z-index: 1;
    padding-bottom: 0.25rem;
}

.ahs-feature-card {
    height: 100%;
    min-height: 140px;
    padding: 1.25rem 1.35rem;
    border-radius: 0;
    background: rgba(250, 173, 33, 0.1);
    border: 1px solid var(--ahs-line);
    box-shadow: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.ahs-feature-card:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(241, 124, 42, 0.55);
    background: rgba(250, 173, 33, 0.14);
}

.ahs-feature-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 72, 142, 0.06);
    border: 1px solid var(--ahs-line);
    color: #0f488e;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ahs-feature-card:hover .ahs-feature-card__icon {
    background: #0f488e;
    border-color: #0f488e;
    color: #faad21;
}

.ahs-feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f488e;
    margin-bottom: 0.3rem;
}

.ahs-feature-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(15, 72, 142, 0.78);
}

/* Sections */
.ahs-section {
    padding-top: clamp(2.5rem, 6vw, 4.75rem);
    padding-bottom: clamp(2.5rem, 6vw, 4.75rem);
}

.ahs-section--tint {
    background: rgba(250, 173, 33, 0.06);
    border-top: 1px solid var(--ahs-line);
    border-bottom: 1px solid var(--ahs-line);
}

.ahs-section-header {
    max-width: 38rem;
    margin-inline: auto;
    margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
    text-align: center;
}

.ahs-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f17c2a;
    margin-bottom: 0.4rem;
}

.ahs-section-title {
    font-family: "Jost", sans-serif;
    font-weight: 700;
    color: #0f488e;
    line-height: 1.18;
}

.ahs-section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin: 0.85rem auto 0;
    border-radius: 0;
    background: #f17c2a;
}

.ahs-section-header.text-md-start .ahs-section-title::after {
    margin-left: 0;
    margin-right: auto;
}

/* À propos */
.ahs-about__visual {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid var(--ahs-line-strong);
}

.ahs-about__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid rgba(15, 72, 142, 0.08);
    pointer-events: none;
}

.ahs-stat-big {
    font-family: "Jost", sans-serif;
    font-weight: 700;
    font-size: clamp(3.25rem, 9vw, 4.5rem);
    line-height: 1;
    color: #0f488e;
    letter-spacing: -0.02em;
}

.ahs-section-divider-top {
    border-top: 1px solid var(--ahs-line);
}

.ahs-pillar {
    padding: 1rem 1rem 1rem 1.1rem;
    border-left: 3px solid #f17c2a;
    border-radius: 0;
    background: rgba(250, 173, 33, 0.05);
    transition: border-color 0.2s, background 0.2s;
}

.ahs-pillar:hover {
    background: rgba(250, 173, 33, 0.08);
    border-left-color: #0f488e;
}

.ahs-pillar h3,
.ahs-pillar h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f488e;
}

.ahs-pillar p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(15, 72, 142, 0.76);
}

/* Chiffres — fond header.jpg (comme les en-têtes de page) */
.ahs-home .ahs-stats.facts {
    background: linear-gradient(rgba(15, 72, 142, 0.75), rgba(15, 72, 142, 0.75)),
        url(../img/header.jpg) center center / cover no-repeat;
}

.ahs-stats .display-4 {
    font-family: "Jost", sans-serif;
    font-weight: 700;
    color: #faad21 !important;
    line-height: 1.1;
}

.ahs-stats .fs-5 {
    color: rgba(250, 173, 33, 0.96) !important;
    max-width: 12rem;
    margin-inline: auto;
    line-height: 1.35;
}

.ahs-stat-icon {
    color: rgba(250, 173, 33, 0.88) !important;
    opacity: 0.95;
}

/* Valeurs */
.ahs-value-card {
    border-radius: 0;
    padding: 1.75rem 1.35rem;
    background: rgba(250, 173, 33, 0.06);
    border: 1px solid var(--ahs-line);
    box-shadow: none;
    height: 100%;
    transition: border-color 0.2s, background 0.2s;
}

.ahs-value-card:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(241, 124, 42, 0.45);
    background: rgba(250, 173, 33, 0.09);
}

.ahs-value-card .btn-square {
    border-radius: 0 !important;
    background: rgba(15, 72, 142, 0.06) !important;
    border: 1px solid var(--ahs-line);
    transition: background 0.2s, border-color 0.2s;
}

.ahs-value-card:hover .btn-square {
    background: #0f488e !important;
    border-color: #0f488e;
    transform: none;
}

.ahs-value-card:hover .btn-square i {
    color: #faad21 !important;
}

/* Missions — grille accueil */
.ahs-home .service-item {
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid var(--ahs-line);
    transition: border-color 0.2s;
}

.ahs-home .service-item:hover {
    box-shadow: none;
    border-color: rgba(15, 72, 142, 0.28);
}

.ahs-home .service-item .service-text {
    box-shadow: none !important;
    border-radius: 0 !important;
    border-left: none;
}

.ahs-home .service-item .service-img.rounded {
    border-radius: 0 !important;
}

/* Cartes « Nos domaines » : pas d’image de fond ; Font Awesome + filigrane au survol ; titre blanc au survol */
.ahs-home .ahs-service-card .service-text {
    position: relative;
    overflow: hidden;
    border-left: none !important;
}

.ahs-home .ahs-service-card .ahs-service-hover-icon {
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    font-size: clamp(3.25rem, 11vw, 5.25rem);
    line-height: 1;
    color: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.ahs-home .ahs-service-card:hover .ahs-service-hover-icon {
    opacity: 1;
}

.ahs-home .ahs-service-card .service-text > .btn-square,
.ahs-home .ahs-service-card .service-text > h3,
.ahs-home .ahs-service-card .service-text > p,
.ahs-home .ahs-service-card .service-text > a {
    position: relative;
    z-index: 1;
}

.ahs-home .ahs-service-card:hover .service-text h3 {
    color: #fff !important;
}

.ahs-home .ahs-service-card .ahs-service-card__fa-icon {
    transition: color 0.25s ease;
    color: #0f488e;
}

.ahs-home .ahs-service-card:hover .ahs-service-card__fa-icon {
    color: #fff !important;
}

/* CTA — fond message.jpg */
.ahs-home .ahs-section.quote {
    background: linear-gradient(rgba(15, 72, 142, 0.75), rgba(15, 72, 142, 0.75)),
        url(../img/message.jpg) center center / cover no-repeat;
}

.ahs-cta-glass {
    border-radius: 0;
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
    background: rgba(250, 173, 33, 0.14);
    border: 1px solid var(--ahs-line-strong);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.ahs-cta-glass .btn {
    min-height: 48px;
    border-radius: 0;
    font-weight: 600;
    transition: opacity 0.2s, background-color 0.2s, border-color 0.2s;
}

.ahs-cta-glass .btn:hover {
    transform: none;
}

/* Titre principal du bloc CTA (accueil) */
#cta-heading.ahs-section-title {
    color: #faad21;
}

#cta-heading.ahs-section-title::after {
    background: #faad21;
}

/* Actualités — titre limité à 3 lignes + ellipsis, hauteur carte calée là-dessus */
.ahs-news-card {
    --ahs-news-title-fs: 1.05rem;
    --ahs-news-title-lh: 1.375;
    --ahs-news-title-lines: 3;
    --ahs-news-title-block: calc(var(--ahs-news-title-fs) * var(--ahs-news-title-lh) * var(--ahs-news-title-lines));
    --ahs-news-thumb-h: 11rem;
    --ahs-news-thumb-gap: 1rem;
    --ahs-news-meta-max-h: 3rem;
    --ahs-news-btn-h: 2.375rem;

    border-radius: 0;
    padding: 1.35rem 1.35rem 1.25rem;
    height: calc(
        var(--ahs-news-thumb-h) + var(--ahs-news-thumb-gap) + var(--ahs-news-meta-max-h) +
        0.5rem + var(--ahs-news-title-block) + 0.5rem + var(--ahs-news-btn-h) + 1.25rem
    );
    min-height: calc(
        var(--ahs-news-thumb-h) + var(--ahs-news-thumb-gap) + var(--ahs-news-meta-max-h) +
        0.5rem + var(--ahs-news-title-block) + 0.5rem + var(--ahs-news-btn-h) + 1.25rem
    );
    max-height: calc(
        var(--ahs-news-thumb-h) + var(--ahs-news-thumb-gap) + var(--ahs-news-meta-max-h) +
        0.5rem + var(--ahs-news-title-block) + 0.5rem + var(--ahs-news-btn-h) + 1.25rem
    );
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(250, 173, 33, 0.08);
    border: 1px solid var(--ahs-line);
    border-top: 3px solid #f17c2a;
    box-shadow: none;
    transition: border-color 0.2s, background 0.2s;
}

.ahs-news-card:hover {
    transform: none;
    box-shadow: none;
    border-top-color: #0f488e;
    background: rgba(250, 173, 33, 0.1);
}

.ahs-news-card .btn {
    margin-top: auto;
    align-self: flex-start;
    border-radius: 0;
}

.ahs-news-card__thumb {
    display: block;
    margin: -1.35rem -1.35rem 1rem;
    overflow: hidden;
    border-bottom: 1px solid var(--ahs-line);
    outline: none;
}

.ahs-news-card__thumb img {
    width: 100%;
    height: 11rem;
    aspect-ratio: unset;
    object-fit: cover;
    display: block;
    transition: transform 0.35s var(--ahs-home-ease);
}

.ahs-news-card__thumb:hover img,
.ahs-news-card__thumb:focus-visible img {
    transform: scale(1.03);
}

.ahs-news-card > p.small {
    flex-shrink: 0;
    max-height: var(--ahs-news-meta-max-h);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.ahs-news-card h3 {
    flex: 0 0 auto;
    height: var(--ahs-news-title-block);
    min-height: var(--ahs-news-title-block);
    max-height: var(--ahs-news-title-block);
    font-size: 0;
    font-weight: 700;
    color: #0f488e;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.ahs-news-card h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    font-family: "Jost", sans-serif;
    font-weight: 700;
    font-size: var(--ahs-news-title-fs);
    line-height: var(--ahs-news-title-lh);
    color: inherit;
    text-decoration: none;
}

.ahs-gallery-item {
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: none;
    border: 1px solid var(--ahs-line);
    transition: border-color 0.2s;
}

.ahs-gallery-item:hover {
    border-color: rgba(15, 72, 142, 0.3);
}

.ahs-gallery-item img {
    transition: transform 0.4s var(--ahs-home-ease);
}

.ahs-gallery-item:hover img {
    transform: scale(1.03);
}

.ahs-gallery-album__header h3 {
    font-family: "Jost", sans-serif;
    font-weight: 700;
}

.ahs-gallery-categories__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
}

.ahs-gallery-cat-pill {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f488e;
    background: rgba(250, 173, 33, 0.12);
    border: 1px solid var(--ahs-line);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ahs-gallery-cat-pill:hover,
.ahs-gallery-cat-pill:focus-visible {
    color: #0f488e;
    border-color: #f17c2a;
    background: rgba(250, 173, 33, 0.2);
}

.ahs-gallery-cat-pill.is-active {
    background: #0f488e;
    border-color: #0f488e;
    color: #faad21;
}

/* Témoignages */
.ahs-home .testimonial-carousel .owl-nav .owl-prev,
.ahs-home .testimonial-carousel .owl-nav .owl-next {
    border-radius: 0;
    border: 1px solid var(--ahs-line-strong);
    box-shadow: none;
}

.ahs-testimonial-aside {
    padding-right: clamp(0rem, 3vw, 2rem);
}

.ahs-quote-mark {
    color: #f17c2a;
    font-size: 2.75rem;
    line-height: 1;
    font-family: "Jost", serif;
    font-weight: 700;
    opacity: 0.45;
}

/* Boutons & images dans l’accueil : angles droits */
.ahs-home .btn:not(.btn-lg-square) {
    border-radius: 0;
}

.ahs-home .img-fluid.rounded,
.ahs-home .rounded {
    border-radius: 0 !important;
}

.ahs-testimonial-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 72, 142, 0.06);
    border: 1px solid var(--ahs-line);
    color: #0f488e;
    flex-shrink: 0;
}

.ahs-testimonial-icon svg {
    width: 2rem;
    height: 2rem;
}

.ahs-home .ahs-value-card .rounded-circle {
    border-radius: 0 !important;
}
