/* ==========================================================================
   YUP YUP - Styles communs des pages de contenu (métiers, modèles, et les pages
   écrites sur la même base). Chargé après styles.css, qui porte les polices,
   les variables, l'en-tête, le pied de page, les boutons et la FAQ.
   Aucun style en ligne dans les pages : tout passe par ce fichier.
   ========================================================================== */

/* Lien d'évitement */
.skip-link {
    position: absolute;
    left: 8px;
    top: -64px;
    z-index: 200;
    padding: 12px 20px;
    background: var(--color-white);
    color: var(--color-black);
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 8px;
}

/* Fil d'Ariane */
.fil ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 14px;
}

.fil li + li::before {
    content: "/";
    margin-right: 8px;
    opacity: 0.5;
}

.fil a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fil a:hover {
    opacity: 0.7;
}

/* Bandeau d'ouverture */
.page-hero {
    background: var(--bg-light-yellow);
    padding: 40px var(--container-padding) 72px;
}

.page-hero__inner {
    max-width: 880px;
    margin: 0 auto;
}

.page-hero__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 52px;
    line-height: 1.05;
    margin: 32px 0 20px;
    overflow-wrap: break-word;
}

.page-hero__lead {
    font-size: 20px;
    line-height: 1.55;
    max-width: 720px;
}

.page-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-md);
    margin-top: var(--gap-lg);
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-md);
    margin-top: 32px;
}

.page-yy .btn {
    white-space: normal;
    text-align: center;
}

.btn--contour {
    background: transparent;
    color: var(--color-black);
    border: 2px solid var(--color-black);
}

.btn--contour:hover {
    background: var(--color-black);
    color: var(--color-white);
    transform: translateY(-2px);
}

.page-yy .btn:focus-visible,
.page-yy a:focus-visible,
.page-yy summary:focus-visible {
    outline: 3px solid var(--color-blue);
    outline-offset: 3px;
}

/* Sections */
.page-section {
    padding: 72px var(--container-padding);
}

.page-section--alt {
    background: var(--color-white);
}

.page-section--prix {
    background: var(--bg-light-blue);
}

.page-section--faq {
    background: var(--bg-light-yellow);
}

.page-section--apercu {
    padding-top: 56px;
    padding-bottom: 0;
}

.page-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.page-wrap--large {
    max-width: 1040px;
    margin-top: 48px;
}

.page-section--apercu .page-wrap--large {
    margin-top: 0;
}

.page-section h2,
.page-cta h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 36px;
    line-height: 1.1;
    margin-bottom: var(--gap-lg);
    overflow-wrap: break-word;
}

/* Texte courant */
.prose p,
.prose li,
.faq-item__answer p {
    font-size: 18px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.prose p,
.faq-item__answer p {
    margin-bottom: var(--gap-md);
}

.prose h3 {
    font-size: 20px;
    margin: 28px 0 8px;
}

.prose ul {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.prose li {
    position: relative;
    padding-left: 28px;
}

.prose li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.7em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-yellow);
}

.prose a,
.faq-item__answer a,
.apercu__legende a {
    color: var(--color-purple);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose a:hover,
.faq-item__answer a:hover,
.apercu__legende a:hover {
    color: var(--color-black);
}

/* Table des prix */
.prix-table-cadre {
    margin: var(--gap-lg) 0;
}

.prix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-white);
    border: 2px solid var(--border-blue);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
}

.prix-table th,
.prix-table td {
    padding: 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-beige-dark);
}

.prix-table thead th {
    background: var(--color-black);
    color: var(--color-white);
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 0;
}

.prix-table tbody tr:last-child th,
.prix-table tbody tr:last-child td {
    border-bottom: 0;
}

.prix-table tbody th {
    font-weight: 600;
}

/* Note de « sans engagement* », juste sous les prix (lot E) */
.prix-note {
    margin: calc(-1 * var(--gap-lg) + 12px) 0 var(--gap-lg);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-black);
}

/* Aperçu de la démo, à la place réservée */
.apercu {
    margin: 0;
}

.apercu__cadre {
    border: 3px solid var(--color-black);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-white);
}

.apercu__barre {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--color-black);
    color: var(--color-white);
    font-size: 13px;
}

.apercu__point {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-yellow);
}

.apercu__point:nth-child(2) {
    background: var(--color-blue);
}

.apercu__point:nth-child(3) {
    background: var(--color-red);
}

.apercu__adresse {
    margin-left: 8px;
    opacity: 0.8;
}

.apercu__zone {
    position: relative;
    height: 640px;
    background: var(--color-white);
}

.apercu__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
}

.apercu__bouton {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    box-shadow: 0 8px 24px rgba(31, 19, 20, 0.35);
}

.apercu__bouton:hover {
    transform: translateX(-50%) translateY(-2px);
}

.apercu__iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--color-white);
}

.apercu__legende {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.5;
}

/* Questions : la mise en forme des questions vient de styles.css */
.page-section--faq .faq__list {
    margin-top: var(--gap-lg);
}

.faq-item__question span:first-child {
    padding-right: var(--gap-md);
}

.faq-item__answer p:last-child {
    margin-bottom: 0;
}

/* Appel final */
.page-cta {
    background: var(--color-purple);
    color: var(--color-white);
    text-align: center;
    padding: 72px var(--container-padding);
}

.page-cta p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: var(--gap-lg);
}

/* Pied de page : plus de liens que l'accueil, ils passent à la ligne, sur deux rangées */
.page-yy .footer__liens {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.page-yy .footer__nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 32px;
}

.page-yy .footer__nav--ressources a {
    font-size: 12px;
    font-weight: 400;
}

@media (max-width: 1024px) {
    .page-hero__title {
        font-size: 44px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 24px var(--container-padding) 48px;
    }

    .page-hero__title {
        font-size: 34px;
        margin: 24px 0 16px;
    }

    .page-hero__lead,
    .prose p,
    .prose li,
    .page-cta p {
        font-size: 17px;
    }

    .page-hero__actions .btn {
        width: 100%;
    }

    .page-section,
    .page-cta {
        padding: 48px var(--container-padding);
    }

    .page-section--apercu {
        padding-top: 32px;
        padding-bottom: 0;
    }

    .page-section h2,
    .page-cta h2 {
        font-size: 28px;
    }

    .apercu__zone {
        height: 520px;
    }

    .prix-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .prix-table tr,
    .prix-table th,
    .prix-table td {
        display: block;
    }

    .prix-table tbody tr {
        border-bottom: 2px solid var(--border-beige-dark);
    }

    .prix-table tbody tr:last-child {
        border-bottom: 0;
    }

    .prix-table tbody th {
        background: var(--bg-off-white);
    }

    .prix-table td {
        border-bottom: 0;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .prix-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--color-purple);
    }

    .faq-item__question {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn--contour:hover {
        transform: none;
    }

    .apercu__bouton:hover {
        transform: translateX(-50%);
    }
}

.page-cta a:not(.btn) {
    color: var(--color-white);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Adresses longues (listes de sources) : elles passent à la ligne au lieu de pousser la page */
.prose ul {
    grid-template-columns: minmax(0, 1fr);
}

.prose a,
.prose li {
    overflow-wrap: anywhere;
}

/* Réalisations : résultats mesurés (gros chiffres avec leur légende) */
.prose h4.resultats__titre {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 18px;
    margin: 20px 0 8px;
}

.chiffres {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap-md);
    margin: 4px 0 var(--gap-md);
}

.chiffres__item {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 6px;
    padding: 20px;
    border: 2px solid var(--color-black);
    border-radius: var(--radius-md);
    background: var(--bg-off-white);
}

.chiffres__item dd {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 48px;
    line-height: 1;
    color: var(--color-purple);
}

.chiffres__item dt {
    font-size: 16px;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.chiffres__source {
    font-size: 16px;
}

@media (max-width: 520px) {
    .chiffres {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Réalisations : détail par mois */
.mesures-mois {
    width: 100%;
    max-width: 560px;
    border-collapse: collapse;
    margin: 0 0 var(--gap-md);
    font-size: 16px;
    line-height: 1.4;
}

.mesures-mois caption {
    text-align: left;
    font-weight: 700;
    padding-bottom: 8px;
}

.mesures-mois th,
.mesures-mois td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-black);
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
}

.mesures-mois tbody th {
    text-align: left;
    font-weight: 400;
}

.mesures-mois thead th {
    font-weight: 700;
    border-bottom-width: 2px;
}

.mesures-mois thead th:first-child {
    text-align: left;
}
