@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600&display=swap');

/* ───────── Jetons ───────── */
.home-page {
    --red: var(--institutional-red, #c92525);
    --red-dark: #a11d1d;
    --navy: #1e3a5f;
    --night: #0a1424;
    --surface: #fff;
    --soft: #f3f5f8;
    --ink: #111827;
    --muted: #526071;
    --line: #e2e6ec;
    --shadow: 0 14px 34px rgba(10, 20, 36, .10);
    --gap: 1.5rem;
    --ease: cubic-bezier(.16, 1, .3, 1);

    font-family: 'Inter', system-ui, sans-serif;
    color: var(--ink);
    background: var(--surface);
    overflow-x: clip;
}
[data-theme="dark"] .home-page {
    --surface: #0e121a;
    --soft: #151a24;
    --ink: #f2f4f7;
    --muted: #b3bcc9;
    --line: #262d3a;
    --shadow: 0 14px 34px rgba(0, 0, 0, .45);
}
.home-page h1, .home-page h2, .home-page h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }
.home-page img { display: block; max-width: 100%; }
.home-page ul { list-style: none; margin: 0; padding: 0; }
.home-page a { color: inherit; }
.home-page :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.hm-container { width: min(1240px, 100%); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

/* ───────── Boutons ───────── */
.btn-venezia {
    display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
    padding: .95rem 1.9rem; border: 2px solid transparent; border-radius: 999px;
    font: 600 1rem 'Inter', sans-serif; text-decoration: none; cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn-venezia--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-venezia--primary:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); }
.btn-venezia--secondary { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-venezia--secondary:hover { background: #fff; border-color: #fff; color: var(--night); }

/* ───────── Bannière ───────── */
.hm-hero { position: relative; overflow: hidden; background: var(--night); color: #fff; }
.hm-hero__bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(55% 70% at 78% 45%, rgba(30, 58, 95, .75), transparent 70%),
        radial-gradient(35% 45% at 8% 100%, rgba(201, 37, 37, .16), transparent 70%);
}
.hm-hero__grid {
    position: relative;
    display: grid; grid-template-columns: 1.02fr .98fr; align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    padding-block: clamp(3rem, 7vw, 6rem);
    min-height: min(760px, 92vh);
}
.hm-hero__badge {
    display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem;
    padding: .45rem 1rem; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
    font-size: .88rem; color: rgba(255, 255, 255, .82);
}
.hm-hero__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(201, 37, 37, .3); }
.hm-hero__title { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700; margin-bottom: 1rem; }
.hm-hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 500; color: #fff; margin-bottom: 1rem; max-width: 40ch; }
.hm-hero__desc { color: rgba(255, 255, 255, .74); line-height: 1.75; max-width: 54ch; margin-bottom: 2rem; }
.hm-hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.25rem; }
.hm-hero__contact { display: flex; flex-wrap: wrap; gap: .75rem 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .14); }
.hm-hero__contact li { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.hm-hero__contact svg { flex-shrink: 0; color: #ff7b7b; }
.hm-hero__contact a { color: rgba(255, 255, 255, .88); text-decoration: none; overflow-wrap: anywhere; }
.hm-hero__contact a:hover { color: #fff; text-decoration: underline; }

/* Carte de la RDC */
.hm-hero__map { margin: 0; }
.hm-map { width: 100%; height: auto; max-height: 600px; overflow: visible; font-family: 'Inter', sans-serif; }
.hm-map__grid line { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.hm-map__grid .hm-map__equator { stroke: rgba(255, 255, 255, .2); stroke-dasharray: 4 7; }
.hm-map__tag { fill: rgba(255, 255, 255, .38); font-size: 12px; }

.hm-map__shape { fill: url(#hm-fill); opacity: 0; animation: hm-fade 1.2s ease 2.2s forwards; }

/* 🎯 MODIFICATION : Animation en boucle infinie (au lieu d'une seule fois) */
.hm-map__outline {
    fill: none; stroke: #fff; stroke-opacity: .92; stroke-width: 1.8; stroke-linejoin: round;
    stroke-dasharray: 1; stroke-dashoffset: 1; 
    animation: hm-draw-loop 6s ease-in-out infinite;
}

.hm-map__links path {
    fill: none; stroke: #ff7b7b; stroke-opacity: .8; stroke-width: 1.6;
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: hm-draw 1.4s ease calc(2.8s + var(--i, 0) * .25s) forwards;
}
.hm-map__links .hm-map__links-main { stroke: #fff; stroke-width: 2.4; animation-delay: 2.5s; }
.hm-map__cities g { opacity: 0; animation: hm-fade .6s ease calc(3.4s + var(--i, 0) * .25s) forwards; }
.hm-map__cities circle { fill: #fff; }
.hm-map__cities text { fill: rgba(255, 255, 255, .85); font-size: 14px; }

.hm-map__dot { fill: var(--red); stroke: #fff; stroke-width: 3; opacity: 0; animation: hm-fade .5s ease 2.4s forwards; }
.hm-map__pulse {
    fill: none; stroke: var(--red); stroke-width: 2; opacity: 0;
    transform-box: fill-box; transform-origin: center;
    animation: hm-pulse 2.4s ease-out 3s infinite;
}
.hm-map__label { fill: #fff; font-size: 16px; font-weight: 600; opacity: 0; animation: hm-fade .6s ease 2.8s forwards; }

/* 🎯 NOUVEAU KEYFRAME : Boucle infinie fluide pour la carte */
@keyframes hm-draw-loop {
    0%   { stroke-dashoffset: 1; opacity: 0; }
    10%  { opacity: 1; }
    80%  { stroke-dashoffset: 0; opacity: 1; }
    95%  { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 1; opacity: 0; }
}

@keyframes hm-draw { to { stroke-dashoffset: 0; } }
@keyframes hm-fade { to { opacity: 1; } }
@keyframes hm-pulse { 0% { opacity: .85; transform: scale(1); } 100% { opacity: 0; transform: scale(3.4); } }

/* ───────── Chiffres ───────── */
.hm-figures { 
    background: var(--surface); 
    border-bottom: 1px solid var(--line); 
}

/* 🎯 Cette classe ne gère QUE la grille. 
   Les marges et la largeur sont gérées par .hm-container dans le HTML */
.hm-figures__list { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
}

.hm-figures__list li { 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    
    padding: clamp(1.5rem, 3vw, 2.4rem) 1rem; 
    border-left: 1px solid var(--line); 
}

.hm-figures__list li:first-child { 
    border-left: 0; 
}

.hm-figures__list strong { 
    display: block; 
    font: 700 clamp(2rem, 4vw, 3rem) 'Playfair Display', serif; 
    color: var(--red); 
    line-height: 1; 
}

.hm-figures__list span { 
    display: block; 
    margin-top: .6rem; 
    color: var(--muted); 
    font-size: .95rem; 
    line-height: 1.4; 
    max-width: 22ch;
}
/* ───────── Sections ───────── */
.hm-section { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.hm-section--soft { background: var(--soft); }
.hm-section--plain { background: var(--surface); }
.hm-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.hm-head--center { text-align: center; }
.hm-head__title { font-size: clamp(1.8rem, 3.8vw, 2.7rem); font-weight: 700; color: var(--ink); }
.hm-head__title::after { content: ''; display: block; width: 56px; height: 3px; margin: 1rem auto 0; background: var(--red); }
.hm-head__text { max-width: 62ch; margin: 1.25rem auto 0; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }

/* À la une */
.hm-spotlight { position: relative; height: clamp(280px, 42vw, 520px); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: var(--night); }
.hm-spotlight__item { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease; }
.hm-spotlight__item.is-active { opacity: 1; }
.hm-spotlight__caption {
    position: absolute; inset: auto 0 0 0; color: #fff;
    padding: clamp(1.25rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 5vw, 4rem);
    background: linear-gradient(to top, rgba(8, 12, 20, .92), transparent);
}
.hm-spotlight__caption h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: .5rem; }
.hm-spotlight__caption p { max-width: 60ch; color: rgba(255, 255, 255, .9); line-height: 1.6; }
.hm-spotlight__dots { position: absolute; right: clamp(1rem, 3vw, 2rem); bottom: 1.25rem; display: flex; gap: .55rem; }
.hm-spotlight__dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .3s, background .3s; }
.hm-spotlight__dots button.is-active { width: 32px; background: var(--red); }

/* ───────── Carrousels ───────── */
.hm-carousel { --pv: 3; }
.hm-track {
    display: flex; gap: var(--gap); overflow-x: auto; padding: .5rem .25rem 1.25rem;
    scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.hm-track::-webkit-scrollbar { display: none; }
.hm-card, .hm-photo { flex: 0 0 calc((100% - (var(--pv) - 1) * var(--gap)) / var(--pv)); scroll-snap-align: start; }

.hm-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: transform .35s var(--ease), border-color .35s; }
.hm-card:hover { transform: translateY(-5px); border-color: var(--red); }
.hm-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); }
.hm-card__media img { width: 100%; height: 100%; object-fit: cover; }

.hm-card__icon { display: grid; place-items: center; width: 48px; height: 48px; margin: -3.2rem 0 1rem; border-radius: 14px; background: var(--navy); color: #fff; border: 3px solid var(--surface); position: relative; }
.hm-card__icon svg { width: 24px; height: 24px; }
.hm-card__title { font-size: 1.3rem; margin-bottom: .6rem; color: var(--ink); }
.hm-card__text { color: var(--muted); line-height: 1.7; font-size: .97rem; }
.hm-card__body { 
    padding: 1.6rem; 
    display: flex;           /* 🎯 Ajouté pour contrôler l'alignement interne */
    flex-direction: column;  /* 🎯 Ajouté pour empiler les éléments */
    flex: 1;                 /* 🎯 Ajouté pour que le corps prenne tout l'espace restant */
}
.hm-photo { position: relative; height: clamp(280px, 30vw, 380px); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.hm-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hm-photo:hover img { transform: scale(1.05); }
.hm-photo__caption { position: absolute; inset: auto 0 0 0; padding: 1.5rem; color: #fff; background: linear-gradient(to top, rgba(8, 12, 20, .9), transparent); }
.hm-photo__caption h3 { font-size: 1.35rem; margin-bottom: .25rem; }
.hm-photo__caption p { color: rgba(255, 255, 255, .88); font-size: .95rem; }

.hm-carousel__nav { display: flex; justify-content: center; gap: .75rem; margin-top: .5rem; }
.hm-arrow { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.hm-arrow:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff; }
.hm-arrow:disabled { opacity: .4; cursor: default; }

/* ───────── Piliers ───────── */
.hm-piliers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.hm-pilier { position: relative; height: clamp(340px, 32vw, 440px); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.hm-pilier__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hm-pilier:hover .hm-pilier__img { transform: scale(1.06); }
.hm-pilier__veil { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.75rem; color: #fff; background: linear-gradient(180deg, rgba(10, 20, 36, .08) 25%, rgba(10, 20, 36, .94) 100%); transition: background .4s; }
.hm-pilier:hover .hm-pilier__veil { background: linear-gradient(180deg, rgba(10, 20, 36, .3) 10%, rgba(10, 20, 36, .96) 100%); }
.hm-pilier__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem; border-radius: 50%; background: var(--red); }
.hm-pilier__icon svg { width: 26px; height: 26px; }
.hm-pilier__title { font-size: 1.35rem; margin-bottom: .6rem; }
.hm-pilier__text { color: rgba(255, 255, 255, .9); line-height: 1.6; font-size: .95rem; }
@media (hover: hover) {
    .hm-pilier__text { max-height: 0; opacity: 0; transition: max-height .45s ease, opacity .35s ease; }
    .hm-pilier:hover .hm-pilier__text { max-height: 9rem; opacity: 1; }
}

/* ───────── Services ───────── */
.hm-services { padding: clamp(1.5rem, 4vw, 3.25rem); border-radius: 24px; background: linear-gradient(135deg, var(--night), var(--navy)); color: #fff; box-shadow: var(--shadow); }
.hm-services__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: .5rem 2rem; }
.hm-services__list li { display: flex; align-items: flex-start; gap: .9rem; padding: .9rem; border-radius: 12px; line-height: 1.45; font-weight: 500; transition: background .25s; }
.hm-services__list li:hover { background: rgba(255, 255, 255, .07); }
.hm-services__list svg { flex-shrink: 0; margin-top: .1rem; color: #ff7b7b; }
.hm-services__more { display: inline-block; margin: 1.5rem 0 0 .9rem; color: #fff; font-weight: 600; text-underline-offset: 4px; }
.hm-services__more:hover { color: #ff9b9b; }

/* ───────── Pourquoi nous ───────── */
.hm-atouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.hm-atout { padding: 2rem; background: var(--soft); border-radius: 16px; border-top: 4px solid var(--red); transition: transform .3s var(--ease); }
.hm-atout:nth-child(even) { border-top-color: var(--navy); }
.hm-atout:hover { transform: translateY(-5px); }
.hm-atout h3 { font-size: 1.2rem; margin-bottom: .75rem; color: var(--ink); }
.hm-atout p { color: var(--muted); line-height: 1.65; }
.hm-atout strong { color: var(--ink); }
.hm-langues { margin-top: 2.5rem; padding: 2rem 1.5rem; text-align: center; border-radius: 18px; background: linear-gradient(135deg, var(--night), var(--navy)); color: #fff; }
.hm-langues h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.hm-langues p { font-weight: 600; letter-spacing: .03em; color: rgba(255, 255, 255, .9); }

/* ───────── Contact ───────── */
.hm-contact { padding-block: clamp(3.5rem, 7vw, 5.5rem); background: var(--night); color: #fff; border-top: 4px solid var(--red); }
.hm-head--light .hm-head__title { color: #fff; }
.hm-contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(1.75rem, 4vw, 3rem); }
.hm-contact__col h3 { display: inline-block; font-size: 1.35rem; margin-bottom: 1.25rem; padding-bottom: .75rem; color: #fff; border-bottom: 2px solid var(--red); }
.hm-contact__col dt { margin-top: 1.1rem; font-weight: 600; color: #fff; }
.hm-contact__col dd { margin: .35rem 0 0; color: rgba(255, 255, 255, .78); line-height: 1.7; }
.hm-contact__col li { padding-block: .1rem; }
.hm-contact__col a { text-decoration: none; overflow-wrap: anywhere; }
.hm-contact__col a:hover { color: #fff; text-decoration: underline; }
.hm-contact__col address { font-style: normal; color: rgba(255, 255, 255, .78); line-height: 1.8; }
.hm-hours { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: clamp(2rem, 4vw, 3rem); padding: 1.5rem; border: 1px solid rgba(201, 37, 37, .7); border-radius: 16px; background: rgba(201, 37, 37, .1); text-align: left; }
.hm-hours svg { flex-shrink: 0; color: #ff7b7b; }
.hm-hours h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.hm-hours p { color: rgba(255, 255, 255, .88); }

/* ───────── Responsive ───────── */
@media (max-width: 1024px) {
    .hm-hero__grid { grid-template-columns: 1fr; min-height: 0; }
    
    /* 🎯 MODIFICATION : La carte s'affiche EN PREMIER sur mobile/tablette */
    .hm-hero__map { 
        order: -1; 
        max-width: 460px; 
        margin-inline: auto; 
        margin-bottom: 2rem;
    }
    
    .hm-carousel { --pv: 2; }
    .hm-figures__list { grid-template-columns: repeat(2, 1fr); }
    .hm-figures__list li:nth-child(3) { border-left: 0; }
    .hm-figures__list li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
    .home-page { --gap: 1rem; }
    .hm-carousel { --pv: 1.15; }
    .hm-hero__actions .btn-venezia { width: 100%; }
    .hm-hero__contact { flex-direction: column; }
    .hm-spotlight { border-radius: 16px; }
    .hm-pilier { height: 360px; }
    .hm-hours { flex-direction: column; text-align: center; }
}

/* ───────── Mouvement réduit : la carte s'affiche directement ───────── */
@media (prefers-reduced-motion: reduce) {
    .home-page *, .home-page *::before, .home-page *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .hm-map__outline, .hm-map__links path { animation: none; stroke-dashoffset: 0; }
    .hm-map__shape, .hm-map__cities g, .hm-map__dot, .hm-map__label { animation: none; opacity: 1; }
    .hm-map__pulse { animation: none; }
}

/* ══════════════════════════════════════════════════════════════
   🎯 NOUVEAUX AJOUTS : SECTION TÉMOIGNAGES
   ══════════════════════════════════════════════════════════════ */

/* Style spécifique pour les cartes de témoignages */
.hm-temoignage-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
    height: 100%;
}

.hm-temoignage-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(10, 20, 36, 0.15);
    border-color: var(--red);
}

/* Le carrousel existant gère déjà :
   - 3 cartes visibles sur ordinateur (--pv: 3)
   - 2 cartes sur tablette (--pv: 2)
   - 1 carte avec aperçu de la suivante sur mobile (--pv: 1.15)
*/

/* Formulaire de témoignage */
.hm-testimonial-form {
    max-width: 600px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hm-testimonial-form h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
    color: var(--ink);
}

.hm-testimonial-form input,
.hm-testimonial-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hm-testimonial-form input:focus,
.hm-testimonial-form textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(201, 37, 37, 0.1);
}

.hm-testimonial-form textarea {
    resize: vertical;
    min-height: 100px;
}

[data-theme="dark"] .hm-testimonial-form {
    background: var(--surface);
    border-color: var(--line);
}

[data-theme="dark"] .hm-testimonial-form h3 {
    color: var(--ink);
}