/* Accueil : composition validée, isolée des autres gabarits. */
.home-pathways,
.home-faq {
    --home-navy: #002060;
    --home-cyan: #4dc4ff;
    --home-gap: clamp(24px, 3vw, 40px);
    box-sizing: border-box;
    padding: var(--accueil-section, 80px) var(--accueil-gouttiere, 24px);
    font-family: 'Poppins', sans-serif;
}

.home-pathways *,
.home-faq * { box-sizing: border-box; }

/*
 * Titres de ces deux sections : Poppins en gras, comme sur les maquettes.
 * Aucune police supplementaire n'est chargee ; ailleurs sur le site les titres
 * de section restent en Belanosima.
 */
.home-pathways h2,
.home-pathways h3,
.home-faq h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.home-section-inner { max-width: 1240px; margin-inline: auto; }

.home-pathways { background: #fff; color: var(--home-navy); }

.home-pathways-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 32px;
    margin-bottom: 28px;
}

.home-pathways-heading h2 {
    margin: 0;
    color: var(--home-navy);
    font-size: clamp(32px, 3.4vw, 50px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.home-pathways-intro {
    flex-shrink: 0;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    text-align: right;
}

.home-pathways-grid {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    grid-template-rows: repeat(2, minmax(260px, 1fr));
    gap: 12px;
}

.home-pathway {
    /* Image, voile puis texte : trois couches à l'intérieur de chaque lien. */
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px;
    overflow: hidden;
    border-radius: 5px;
    color: #fff;
    background: var(--home-navy);
    text-decoration: none;
}

.home-pathway:visited,
.home-pathway:hover { color: #fff; text-decoration: none; }
.home-pathway:focus-visible { outline: 3px solid var(--home-navy); outline-offset: 5px; }

.home-pathway-image,
.home-pathway-cutout {
    position: absolute;
    z-index: -2;
    display: block;
    margin: 0;
    transition: transform 300ms ease;
}

.home-pathway-image { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-pathway::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.home-pathway-number { font-size: 18px; line-height: 1.3; font-weight: 700; }
.home-pathway-copy { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding-top: 20px; }
.home-pathway h3 { margin: 0 0 8px; color: inherit; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; }
.home-pathway p { margin: 0 0 22px; font-size: clamp(15px, 1.45vw, 20px); line-height: 1.5; }

.home-text-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    min-height: 44px;
    color: inherit;
    font-size: 15px;
    line-height: 1.5;
    text-decoration: none;
}

.home-text-link > span:first-child {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.home-pathway .home-text-link { margin-top: auto; }
/* Trait fin dessine, plutot qu'un glyphe de 28 px dont l'epaisseur depend de
   la police disponible et ecrasait le libelle a cote. */
.home-arrow {
    display: inline-block;
    flex-shrink: 0;
    width: 24px;
    height: 10px;
    transition: transform 200ms ease;
}

.home-arrow svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.home-pathway-purchase { grid-row: span 2; }
.home-pathway-purchase .home-pathway-number { color: var(--home-cyan); }
.home-pathway-purchase .home-pathway-copy { flex: 0; margin-top: auto; padding-top: 150px; }
.home-pathway-purchase .home-pathway-image { object-position: 52% 50%; }
.home-pathway-purchase::after {
    /* Deux voiles : un leger en haut pour que le numero reste lisible quelle que
       soit la zone de photo qui s'y trouve, un fort en bas pour le texte. */
    background:
        linear-gradient(180deg, rgba(0, 32, 76, 0.5), transparent 20%),
        linear-gradient(0deg, rgba(0, 32, 76, 0.96), rgba(0, 32, 76, 0.35) 34%, transparent 64%);
}

.home-pathway-rental,
.home-pathway-rental:visited,
.home-pathway-rental:hover { background: var(--home-cyan); color: var(--home-navy); }
.home-pathway-rental::after { content: none; }
.home-pathway-cutout {
    right: 4px;
    bottom: 4px;
    width: 57%;
    height: 97%;
    object-fit: contain;
    object-position: right bottom;
}
.home-pathway-rental h3,
.home-pathway-rental p { max-width: 53%; }

.home-pathway-used .home-pathway-image { left: auto; width: 70%; object-position: 61% center; }
.home-pathway-used::after { background: linear-gradient(90deg, #002060 0%, #002060 34%, rgba(0, 32, 96, 0.94) 41%, rgba(0, 32, 96, 0.15) 65%, transparent 82%); }
.home-pathway-used p { max-width: 53%; }
.home-pathway-used .home-text-link { color: var(--home-cyan); }

/* FAQ : les réponses restent éditables dans Easy Accordion. */
.home-faq { background: var(--home-navy); color: #fff; }
.home-faq-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); gap: clamp(40px, 5vw, 72px); align-items: start; }
.home-faq-label { margin: 0 0 22px; color: var(--home-cyan); font-size: 12px; font-weight: 600; letter-spacing: 0.19em; line-height: 1.6; text-transform: uppercase; }
.home-faq h2 { margin: 0 0 22px; max-width: 11ch; color: #fff; font-size: clamp(38px, 4.4vw, 62px); line-height: 1.07; letter-spacing: -0.025em; }
.home-faq-description { margin: 0 0 14px; font-size: 16px; line-height: 1.6; }
.home-faq .home-text-link,
.home-faq .home-text-link:visited { color: var(--home-cyan); }
.home-faq .home-text-link:hover { color: #fff; }
.home-faq .home-text-link:focus-visible { outline: 2px solid var(--home-cyan); outline-offset: 5px; }
.home-faq-photo { display: block; width: 100%; height: auto; aspect-ratio: 1.65; object-fit: cover; object-position: 57% center; margin-top: 24px; }
.home-faq-items { border-top: 1px solid rgba(77, 196, 255, 0.65); }
.home-faq-item { margin: 0; border: 0; border-bottom: 1px solid rgba(77, 196, 255, 0.65); }
.home-faq-item summary {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    gap: 20px;
    align-items: start;
    padding: 26px 0;
    list-style: none;
    cursor: pointer;
    color: #fff;
}
.home-faq-item summary::-webkit-details-marker { display: none; }
.home-faq-item summary::marker { content: ''; }
.home-faq-item summary:focus-visible { outline: 2px solid var(--home-cyan); outline-offset: 6px; }
.home-faq-item summary:hover .home-faq-question { color: var(--home-cyan); }
.home-faq-number { color: var(--home-cyan); font-size: 21px; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; }
.home-faq-question { font-size: 18px; font-weight: 600; line-height: 1.55; }
.home-faq-toggle { position: relative; width: 20px; height: 28px; }
.home-faq-toggle::before,
.home-faq-toggle::after { content: ''; position: absolute; top: 13px; left: 0; width: 20px; height: 2px; background: var(--home-cyan); }
.home-faq-toggle::after { transform: rotate(90deg); }
.home-faq-item[open] .home-faq-toggle::after { transform: rotate(0); }
.home-faq-answer { padding: 0 40px 28px 56px; color: #e0e9f7; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.home-faq-answer > :first-child { margin-top: 0; }
.home-faq-answer > :last-child { margin-bottom: 0; }
.home-faq-answer a { color: var(--home-cyan); text-underline-offset: 4px; }
.home-faq-answer img,
.home-faq-answer iframe { max-width: 100%; }
.home-faq-answer .wp-video { max-width: 100%; width: 240px !important; }
.home-faq-answer video { max-width: 100%; max-height: 420px; }
.home-faq-more { margin-top: 22px; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .home-pathway:hover .home-pathway-image,
    .home-pathway:hover .home-pathway-cutout { transform: scale(1.035); }
    .home-pathway:hover .home-arrow,
    .home-text-link:hover .home-arrow { transform: translateX(4px); }
}

@media (max-width: 1023px) {
    .home-pathways-heading { align-items: flex-start; }
    .home-pathways-intro { max-width: 20ch; }
    .home-pathways-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, minmax(240px, 1fr)); }
    .home-pathway { padding: 22px; }
    .home-pathway .home-text-link { gap: 10px; font-size: 13px; }
    .home-pathway-rental h3,
    .home-pathway-rental p { max-width: 60%; }
    .home-pathway-cutout { width: 50%; height: 82%; }
    .home-faq-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); gap: 36px; }
    .home-faq-item summary { grid-template-columns: 28px minmax(0, 1fr) 18px; gap: 14px; padding-block: 22px; }
    .home-faq-question { font-size: 16px; }
    .home-faq-answer { padding-left: 42px; padding-right: 16px; font-size: 15px; }
}

@media (max-width: 767px) {
    .home-pathways-heading { flex-direction: column; gap: 16px; margin-bottom: 24px; }
    .home-pathways-heading h2 { font-size: clamp(30px, 6.4vw, 42px); }
    .home-pathways-intro { max-width: none; padding: 0; font-size: 14px; text-align: left; }
    .home-pathways-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 14px; }
    .home-pathway { padding: 24px; min-height: 264px; }
    .home-pathway-purchase { grid-row: auto; min-height: 440px; }
    .home-pathway-purchase .home-pathway-image { object-position: 56% center; }
    .home-pathway h3 { font-size: 38px; }
    .home-pathway p { font-size: 17px; }
    .home-pathway .home-text-link { font-size: 14px; gap: 12px; }
    .home-pathway-cutout { width: 58%; height: 78%; right: 5px; bottom: 48px; }
    .home-pathway-rental h3,
    .home-pathway-rental p { max-width: 55%; }
    .home-faq-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .home-faq-label { margin-bottom: 16px; }
    .home-faq h2 { font-size: 44px; max-width: 13ch; margin-bottom: 18px; }
    .home-faq-photo { width: 100%; max-width: 440px; aspect-ratio: 1.8; margin-top: 20px; }
    .home-faq-question { font-size: 16px; }
    .home-faq-item summary { padding-block: 22px; }
    .home-faq-answer { padding-right: 0; padding-bottom: 22px; }
}

@media (max-width: 399px) {
    .home-pathway { padding: 20px; }
    .home-pathway h3 { font-size: 32px; }
    .home-pathway p { font-size: 15px; }
    .home-pathway .home-text-link { font-size: 13px; gap: 10px; }
    .home-pathway-purchase { min-height: 400px; }
    .home-pathway-cutout { width: 56%; height: 76%; }
    .home-faq h2 { font-size: 38px; }
    .home-faq-item summary { grid-template-columns: 24px minmax(0, 1fr) 18px; gap: 10px; }
    .home-faq-answer { padding-left: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-pathway-image,
    .home-pathway-cutout,
    .home-arrow { transition: none; }
}

/*-----------------------------------------------------------*/
/* Accueil : dernieres publications Instagram                  */
/*                                                             */
/* La section suit la bande « Suivez-nous » : fond clair pour   */
/* que les photos ressortent apres le degrade bleu.             */
/*-----------------------------------------------------------*/

.home-instagram {
    --home-navy: #002060;
    --home-cyan: #4dc4ff;

    box-sizing: border-box;
    padding: var(--accueil-section, 80px) var(--accueil-gouttiere, 24px);
    background: #f4f8fc;
    color: var(--home-navy);
    font-family: 'Poppins', sans-serif;
}

.home-instagram * { box-sizing: border-box; }

.home-instagram-entete {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.home-instagram-surtitre {
    margin: 0 0 6px;
    color: #0b6fa4;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.19em;
    line-height: 1.6;
    text-transform: uppercase;
}

.home-instagram-titre {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.home-instagram-compte {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: var(--home-navy);
    font-size: 0.97rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.home-instagram-compte > span:first-child {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.home-instagram-compte:hover { color: #0b6fa4; }

.home-instagram-fleche {
    display: inline-block;
    width: 22px;
    height: 10px;
    transition: transform 200ms ease;
}

.home-instagram-fleche svg { display: block; width: 100%; height: 100%; overflow: visible; }
.home-instagram-compte:hover .home-instagram-fleche { transform: translateX(4px); }

/* Trois cartes visibles, puis deux sur tablette et une sur telephone.
 * La piste reste utilisable sans JavaScript avec le defilement natif. */
.home-instagram-flux {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 40px) / 3);
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 3px;
    scrollbar-width: thin;
    scrollbar-color: #a8bad0 transparent;
    padding: 3px 3px 12px;
    margin: -3px -3px 0;
}

.home-instagram-carte {
    display: flex;
    flex-direction: column;
    /* Sans cette ligne, les cartes situees hors du cadre visible allongeaient la
       page entiere : l'accueil defilait lateralement sur pres de 1 300 px. La
       carte devient son propre repere et son contenu reste dans le carrousel. */
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d4deea;
    border-radius: 5px;
    background: #fff;
    color: var(--home-navy);
    text-decoration: none;
    scroll-snap-align: start;
    transition: border-color 180ms ease;
}

.home-instagram-carte img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0;
}

.home-instagram-legende {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.5;
}

.home-instagram-legende .fa-instagram { font-size: 23px; }
.home-instagram-sortie { margin-left: auto; font-size: 24px; line-height: 1; }
.home-instagram-carte:visited { color: var(--home-navy); }
.home-instagram-carte:hover { color: var(--home-navy); border-color: #7c98bb; }
.home-instagram-carte:hover .home-instagram-legende > span:first-of-type { text-decoration: underline; text-underline-offset: 4px; }
.home-instagram :is(a, button, [tabindex]):focus-visible { outline: 2px solid #0b6fa4; outline-offset: 2px; }

/* Les fleches vivent dans l'en-tete, a droite du compte : elles n'ajoutent plus
   une rangee sous le carrousel, et la section y gagne une soixantaine de pixels. */
.home-instagram-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.home-instagram-commandes { display: flex; gap: 8px; }
.home-instagram-commandes[hidden] { display: none; }
.home-instagram-commandes button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #a7bad2;
    border-radius: 4px;
    background: transparent;
    color: var(--home-navy);
    font: 21px/1 'Poppins', sans-serif;
    box-shadow: none;
    cursor: pointer;
}
.home-instagram-commandes button:hover:not(:disabled) { background: #fff; border-color: var(--home-navy); }
.home-instagram-commandes button:disabled { opacity: .35; cursor: default; }

@media (min-width: 768px) and (max-width: 1023px) {
    .home-instagram-flux { grid-auto-columns: calc((100% - 20px) / 2); }
}

@media (max-width: 767px) {
    .home-instagram-entete {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 24px;
    }

    .home-instagram-compte { padding-block: 6px; }
    .home-instagram-flux { grid-auto-columns: 88%; gap: 14px; }
    .home-instagram-legende { gap: 10px; padding: 12px 14px; font-size: 13px; }

    /* Le compte a gauche, les fleches a droite, sur la meme ligne. */
    .home-instagram-actions {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    /* Au doigt, on revient a 44 px : en dessous, la cible devient penible. */
    .home-instagram-commandes button { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-instagram-carte { transition: none; }
}
