/**
 * /abonnement — pages légales hébergées.
 *
 * Chargée AVANT responsive.css (layout main.php) : ses règles mobiles sont
 * donc écrites ici, dans les mêmes @media, et non dans responsive.css.
 * Couleurs : uniquement les jetons de variables.css. Contrastes vérifiés AA :
 * --text-on-dark sur --dark 6,77:1 ; --text-light sur --bg-alt 5,7:1 ;
 * --primary sur --primary-50 8,9:1.
 */

/* --- Héros : texte centré, puis le livrable --- */
.hero--abonnement { padding-bottom: 3.5rem; }
.hero--abonnement h1 { max-width: 16ch; margin-inline: auto; }
.hero--abonnement .hero-cta { margin-bottom: 3rem; }

.abo-livrable { margin: 0 auto; max-width: 980px; text-align: left; }
.abo-livrable figcaption { margin-top: 1rem; text-align: center; font-size: 0.875rem; color: var(--text-light); }
.abo-livrable figcaption a { text-decoration: underline; text-underline-offset: 2px; }
.abo-livrable-grille { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; }

/* Le site du client, en miniature */
.abo-site {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.abo-site-barre {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}
.abo-site-points { display: inline-flex; gap: 0.3rem; }
.abo-site-points i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.abo-site-adresse {
    flex: 1;
    padding: 0.2rem 0.6rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.abo-site-page { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.25rem 1.25rem 1.5rem; flex: 1; }
.abo-ligne { display: block; height: 8px; border-radius: 4px; background: var(--border-light); }
.abo-ligne--titre { width: 45%; height: 12px; background: var(--border); }
.abo-ligne--courte { width: 70%; }

.abo-site-pied {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--dark);
    color: var(--text-on-dark);
    font-size: 0.8125rem;
    line-height: 1.5;
}
.abo-bloc {
    padding: 0.75rem;
    border: 1px dashed var(--text-on-dark);
    border-radius: var(--radius);
}
.abo-bloc p { margin: 0; }
.abo-bloc-titre { color: var(--bg-white); font-weight: 700; margin-bottom: 0.25rem !important; }
.abo-version {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

/* L'extrait à coller */
.abo-code {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.abo-code-titre { margin: 0 0 0.6rem; font-weight: 700; color: var(--dark); }
.abo-code pre {
    margin: 0;
    padding: 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--dark-600);
    white-space: pre;
}
.abo-code-note { margin: 0.75rem 0 0; font-size: 0.8125rem; color: var(--text-light); }

/* --- Tarifs : deux cartes --- */
.abo-consentement { max-width: 640px; margin: 0 auto 2rem; }
.pricing-grid.abo-tarifs { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin: 0 auto; align-items: stretch; }
.abo-tarif { display: flex; flex-direction: column; }
.abo-tarif:hover { transform: none; }
.abo-tarif .pricing-header h3 { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; }
.abo-tarif-sites { font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; color: var(--text-light); }
.abo-par-mois { font-size: 1rem; font-weight: 600; color: var(--text-light); }
.abo-tarif .pricing-period { margin-top: 0.25rem; font-size: 0.9375rem; color: var(--text-light); }
.abo-inclus { list-style: none; margin: 0 0 1.75rem; padding: 0; flex: 1; }
.abo-inclus li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.6rem;
    font-size: 0.9375rem;
    color: var(--text);
}
.abo-inclus li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.8rem;
    width: 0.7rem;
    height: 0.4rem;
    border-left: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(-45deg);
}
.abo-boutons { display: flex; flex-direction: column; gap: 0.6rem; }
.abo-boutons .btn { width: 100%; }
/* Offre fermée : le bouton ne doit pas avoir l'air cliquable. */
.abo-boutons .btn[disabled] {
    background: var(--bg-alt);
    border-color: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.abo-tarifs-note { margin: 1.25rem auto 0; text-align: center; font-size: 0.875rem; color: var(--text-light); }

/* --- Encart Orbe --- */
.abo-orbe {
    max-width: 860px;
    margin: 3rem auto 0;
    padding: 1.5rem 1.75rem;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
}
.abo-orbe h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.abo-orbe p { margin: 0 0 0.75rem; color: var(--text); }
.abo-orbe a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* --- FAQ en <details> : ouvrable sans JavaScript, au clavier --- */
.abo-faq summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
}
.abo-faq summary::-webkit-details-marker { display: none; }
.abo-faq summary::after {
    content: "";
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
    transition: transform var(--transition);
}
.abo-faq details[open] summary::after { transform: rotate(-135deg); }
.abo-faq summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.abo-faq-reponse { padding: 0 1.5rem 0.25rem; }
.abo-faq-reponse p { margin: 0 0 1rem; color: var(--text-light); font-size: 0.9375rem; line-height: 1.7; }

.abo-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Mobile --- */
@media (max-width: 900px) {
    .abo-livrable-grille { grid-template-columns: minmax(0, 1fr); }
    .pricing-grid.abo-tarifs { grid-template-columns: 1fr; max-width: 440px; }
}
@media (max-width: 520px) {
    .abo-site-pied { grid-template-columns: 1fr; }
    .abo-code pre { font-size: 0.72rem; }
    .abo-orbe { padding: 1.25rem; }
    .abo-faq summary { padding: 1rem 1.1rem; }
    .abo-faq-reponse { padding: 0 1.1rem 0.25rem; }
}
