/* =====================================================================
   PAGE ABONNEMENT + SECTION ABONNEMENT DE L'ACCUEIL
   Chargé uniquement sur la page Abonnement et la page d'accueil.
   ===================================================================== */

.abo-page,
.home-abo {
    --abo-blue: #3D4A9A;
    --abo-red: #E7392E;
    --abo-yellow: #FFD239;
    --abo-yellow-dark: #C9A21E;
    --abo-green: #00A1A2;
    --abo-ink: #1C1C28;
    --abo-cream: #F7F3EC;
    --abo-muted: #55586A;
    --abo-line: #E4DDD0;
    --abo-soft: #C9CDEB;
}

.abo-page {
    background: var(--abo-cream);
    color: var(--abo-ink);
    overflow-x: hidden;
}

.abo-page h1,
.abo-page h2,
.abo-page h3,
.abo-page p,
.home-abo h2,
.home-abo p {
    margin: 0;
}

/* Les sections utilisent le .container du site (mêmes marges que le header) */
.abo-wrap--narrow > * {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.abo-center {
    display: flex;
    justify-content: center;
}

/* ---------- Éléments communs ---------- */

.abo-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    transform: rotate(-2.5deg);
    line-height: 1.3;
}

.abo-tag--red { background: var(--abo-red); }
.abo-tag--green { background: var(--abo-green); }

.abo-hl {
    color: var(--abo-yellow);
}

.abo-btn,
.abo-btn:visited {
    display: inline-block;
    background: var(--abo-yellow);
    color: var(--abo-ink);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
    padding: 16px 28px;
    border-radius: 8px;
    box-shadow: 0 4px 0 var(--abo-yellow-dark);
    text-align: center;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.abo-btn:hover,
.abo-btn:focus-visible {
    color: var(--abo-ink);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--abo-yellow-dark);
}

.abo-btn:focus-visible,
.home-abo a:focus-visible,
.abo-page a:focus-visible,
.abo-page button:focus-visible {
    outline: 3px solid var(--abo-ink);
    outline-offset: 3px;
}

.abo-btn--block {
    display: block;
    width: 100%;
}

.abo-btn--small {
    font-size: 0.9rem;
    padding: 10px 16px;
    box-shadow: 0 3px 0 var(--abo-yellow-dark);
}

.abo-btn--outline,
.abo-btn--outline:visited {
    background: transparent;
    color: var(--abo-blue);
    border: 2px solid var(--abo-blue);
    box-shadow: none;
    padding: 12px 20px;
}

.abo-btn--outline:hover {
    background: var(--abo-blue);
    color: #fff;
    box-shadow: none;
}

/* Liste avec coches */
.abo-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.abo-checks li {
    position: relative;
    padding-left: 26px;
    line-height: 1.45;
}

.abo-checks li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 800;
    color: var(--abo-red);
}

.abo-checks--inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.abo-checks--inline li::before,
.abo-checks--light li::before {
    color: var(--abo-yellow);
}

.abo-checks--card {
    border-top: 1px solid var(--abo-line);
    padding-top: 22px;
    font-size: 0.95rem;
}

/* Couvertures superposées (page abonnement + accueil) */
.abo-covers {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 480 / 440;
    justify-self: center;
}

.abo-covers img {
    position: absolute;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    height: auto;
}

.abo-covers__back {
    right: 0;
    top: 2%;
    width: 58%;
    transform: rotate(6deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.abo-covers__front {
    left: 0;
    top: 9%;
    width: 64%;
    transform: rotate(-4deg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.abo-covers__sticker {
    position: absolute;
    right: 6%;
    bottom: 0;
    background: var(--abo-green);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    transform: rotate(-5deg);
}

.abo-covers__sticker small {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
}

/* En-têtes de section */
.abo-section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.abo-h2 {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    line-height: 1.2;
    font-weight: 800;
}

.abo-h2 .abo-tag {
    font-size: 0.95em;
    margin: 0 4px;
}

.abo-section-head__sub {
    max-width: 560px;
    color: var(--abo-muted);
    font-size: 1.1rem;
    line-height: 1.5;
}

/* =====================================================================
   PAGE ABONNEMENT
   ===================================================================== */

/* ---------- En-tête ---------- */
.abo-hero {
    background: var(--abo-blue);
    color: #fff;
    padding: 150px 0 110px; /* le header du site est en position fixe */
}

.abo-hero__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 56px;
    align-items: center;
}

.abo-hero__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.abo-hero__text > .abo-tag {
    font-size: 1.25rem;
}

.abo-hero__title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    text-wrap: balance;
}

.abo-hero__intro {
    max-width: 480px;
    font-size: 1.15rem;
    line-height: 1.5;
    color: #E6E8F5;
}

.abo-hero__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.abo-hero__price-note {
    font-size: 0.9rem;
    color: var(--abo-soft);
}

/* ---------- Chiffres clés ---------- */
.abo-proof {
    margin-top: -56px;
    position: relative;
    z-index: 2;
}

.abo-proof__list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 2px solid var(--abo-ink);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    overflow: hidden;
}

.abo-proof__item {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid var(--abo-line);
    margin-left: -1px; /* pas de double bordure en début de ligne */
}

.abo-proof__value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.abo-proof__label {
    font-size: 0.875rem;
    color: var(--abo-muted);
    line-height: 1.4;
}

.abo-color--red { color: var(--abo-red); }
.abo-color--blue { color: var(--abo-blue); }
.abo-color--green { color: var(--abo-green); }
.abo-color--yellow { color: #E0A800; }
.abo-color--black { color: var(--abo-ink); }

/* ---------- Ce qu'il y a dedans ---------- */
.abo-inside {
    padding: 100px 0 40px;
}

.abo-inside .abo-wrap {
    display: flex;
    flex-direction: column;
    gap: 72px;
}

.abo-feature {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 48px;
    align-items: center;
}

.abo-feature__img {
    width: 100%;
    aspect-ratio: 1024 / 680;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 12px 30px rgba(28, 28, 40, 0.15);
}

.abo-feature__text {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.abo-feature__text h3 {
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    font-weight: 800;
    line-height: 1.15;
}

.abo-feature__text p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #44475A;
}

/* Image à droite un bloc sur deux (sur grand écran seulement) */
@media (min-width: 860px) {
    .abo-feature--reverse .abo-feature__img {
        order: 2;
    }
}

/* ---------- Offre + étapes ---------- */
.abo-offer-section {
    padding: 80px 0;
    scroll-margin-top: 100px;
}

.abo-offer {
    background: var(--abo-blue);
    color: #fff;
    border-radius: 20px;
    padding: clamp(28px, 5vw, 64px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 56px;
    align-items: center;
}

.abo-card {
    position: relative;
    background: var(--abo-cream);
    color: var(--abo-ink);
    border-radius: 14px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.abo-card__badge {
    position: absolute;
    top: -16px;
    right: 24px;
    background: var(--abo-red);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 6px;
    transform: rotate(4deg);
}

.abo-card__head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.abo-card__title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.abo-card__sub,
.abo-card__period {
    font-size: 0.95rem;
    color: var(--abo-muted);
}

.abo-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.abo-card__amount {
    font-size: clamp(2.8rem, 6vw, 3.75rem);
    font-weight: 800;
    color: var(--abo-blue);
    line-height: 1;
}

.abo-card__legal {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #6E7183;
}

.abo-card__legal a {
    color: inherit;
    text-decoration: underline;
}

.abo-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.abo-steps__title {
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.abo-steps__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
    counter-reset: abo-step;
}

.abo-step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    counter-increment: abo-step;
}

.abo-step::before {
    content: counter(abo-step);
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    background: var(--abo-yellow);
    color: var(--abo-ink);
}

.abo-step:nth-child(3n+2)::before { background: var(--abo-green); color: #fff; }
.abo-step:nth-child(3n+3)::before { background: var(--abo-red); color: #fff; }

.abo-step > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.abo-step__title {
    font-size: 1.2rem;
    font-weight: 700;
}

.abo-step__text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--abo-soft);
}

/* ---------- Témoignages ---------- */
.abo-testimonials {
    padding: 40px 0 100px;
}

.abo-testimonials .abo-wrap {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.abo-quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 20px;
}

.abo-quote {
    margin: 0;
    background: #fff;
    border: 2px solid var(--abo-ink);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 5px 5px 0 var(--abo-red);
}

.abo-quote:nth-child(4n+2) { box-shadow: 5px 5px 0 var(--abo-green); }
.abo-quote:nth-child(4n+3) { box-shadow: 5px 5px 0 var(--abo-yellow); }
.abo-quote:nth-child(4n+4) { box-shadow: 5px 5px 0 var(--abo-blue); }

.abo-quote blockquote {
    margin: 0;
    flex: 1;
}

.abo-quote blockquote::before {
    content: "\201C";
    display: block;
    font-size: 3rem;
    line-height: 0.6;
    font-weight: 800;
    color: var(--abo-red);
    margin-bottom: 12px;
}

.abo-quote:nth-child(4n+2) blockquote::before { color: var(--abo-green); }
.abo-quote:nth-child(4n+3) blockquote::before { color: #E0A800; }
.abo-quote:nth-child(4n+4) blockquote::before { color: var(--abo-blue); }

.abo-quote blockquote p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.abo-quote figcaption {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

.abo-quote figcaption span {
    color: var(--abo-muted);
    font-size: 0.85rem;
}

/* ---------- Médiathèques / écoles ---------- */
.abo-pro-section {
    padding: 0 0 100px;
    scroll-margin-top: 100px;
}

.abo-pro {
    border: 2px dashed var(--abo-blue);
    border-radius: 14px;
    padding: 28px 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.abo-pro > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 320px;
}

.abo-pro__title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--abo-blue);
    line-height: 1.3;
}

.abo-pro__text {
    font-size: 0.95rem;
    color: var(--abo-muted);
}

/* ---------- FAQ ---------- */
.abo-faq-section {
    padding: 0 0 100px;
    scroll-margin-top: 100px;
}

.abo-faq {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 48px;
    align-items: start;
}

.abo-faq__intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.abo-faq__intro p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--abo-muted);
}

.abo-faq__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.abo-faq__list .faq-item {
    background: #fff;
    border: 2px solid var(--abo-ink);
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
}

.abo-faq__list .faq-question {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    width: 100%;
    padding: 18px 52px 18px 20px;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    line-height: 1.4;
}

.abo-faq__list .faq-question::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--abo-red);
}

.abo-faq__list .faq-question[aria-expanded="true"]::after {
    content: "\2013";
}

.abo-faq__list .faq-question:focus-visible {
    outline: 3px solid var(--abo-blue);
    outline-offset: -3px;
}

.abo-faq__list .faq-answer {
    display: none;
    padding: 0 20px 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #44475A;
}

.abo-faq__list .faq-answer p {
    font-size: inherit;
}

/* ---------- Barre flottante ---------- */
.abo-sticky {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translate(-50%, 150%);
    z-index: 90;
    width: max-content;
    max-width: calc(100% - 32px);
    background: var(--abo-ink);
    color: #fff;
    border-radius: 12px;
    padding: 10px 10px 10px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.abo-sticky[hidden] {
    display: none;
}

.abo-sticky.is-visible {
    transform: translate(-50%, 0);
}

/* =====================================================================
   SECTION ABONNEMENT DE L'ACCUEIL (1a)
   ===================================================================== */

.home-abo {
    background: var(--abo-blue);
    color: #fff;
    padding: clamp(64px, 9vw, 120px) 0;
}

.home-abo__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 64px;
    align-items: center;
}

.home-abo__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.home-abo__kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 800;
    color: #fff;
}

.home-abo__title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    text-wrap: balance;
}

.home-abo .abo-checks {
    font-size: 1rem;
}

.home-abo__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-top: 8px;
}

.home-abo__link,
.home-abo__pro {
    color: #fff;
    text-decoration: underline;
}

.home-abo__link { font-size: 0.9rem; }

.home-abo__pro {
    font-size: 0.82rem;
    color: var(--abo-soft);
}

.home-abo__link:hover,
.home-abo__pro:hover {
    color: var(--abo-yellow);
    transform: none;
}

.home-abo__price {
    position: absolute;
    right: 0;
    bottom: 0;
    background: var(--abo-cream);
    color: var(--abo-ink);
    border-radius: 12px;
    padding: 16px 20px;
    transform: rotate(-4deg);
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.home-abo__price strong {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--abo-blue);
    line-height: 1;
}

.home-abo__price span {
    font-size: 0.8rem;
    color: var(--abo-muted);
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 860px) {
    .abo-hero {
        padding: 120px 0 96px;
    }

    .abo-hero__grid,
    .home-abo__grid {
        gap: 40px;
    }

    .abo-covers {
        max-width: 360px;
    }

    .abo-inside {
        padding-top: 72px;
    }

    .abo-inside .abo-wrap {
        gap: 56px;
    }
}

@media (max-width: 600px) {
    .abo-hero__cta,
    .home-abo__cta {
        width: 100%;
    }

    .abo-hero__cta .abo-btn,
    .home-abo__cta .abo-btn {
        width: 100%;
    }

    .abo-proof__list {
        grid-template-columns: repeat(2, 1fr);
    }

    .abo-proof__item {
        padding: 18px 16px;
        border-top: 1px solid var(--abo-line);
        margin-top: -1px;
    }

    .abo-proof__value {
        font-size: 1.6rem;
    }

    .abo-card {
        padding: 28px 20px;
    }

    .abo-pro {
        padding: 22px 18px;
    }

    .abo-pro .abo-btn {
        width: 100%;
    }

    .abo-sticky {
        padding: 8px 8px 8px 14px;
        gap: 10px;
        font-size: 0.8rem;
    }

    .home-abo__price strong {
        font-size: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .abo-btn,
    .abo-sticky {
        transition: none;
    }
}
