/* ================================================================
   MOTRO — css/avis-page.css (30/10/2026, page « Tous les avis »)
   Page /avis SEULE (avis.html). Tous les sélecteurs commencent par #avis-page (le <main>
   de avis.html, absent des autres pages) : rien ne fuit ailleurs, et un identifiant prime
   sur les classes de style.css / prime.css SANS les modifier.
   Même direction que css/garantie.css et css/accueil.css : noir #111, texte secondaire
   #55555b (7:1 sur blanc), filets #E8E8ED, fond gris #F5F5F7, jaune #FFCC00 en accent rare
   (étoiles, point du badge « Achat vérifié »). Manrope, graisses ≤ 800.
   Contexte §24 : une LISTE à filets fins, jamais une grille de cartes identiques.
   40/60 sur écran large (résumé + filtres collants à gauche), une colonne sur téléphone.
   ================================================================ */


/* ── 0. SOCLE ───────────────────────────────────────────────────────────────── */
#avis-page {
    display: block;
    background: #ffffff;
    color: #111111;
}
/* L'attribut hidden gagne toujours sur les display: des composants ci-dessous. */
#avis-page [hidden] { display: none !important; }

/* Texte réservé aux lecteurs d'écran. */
#avis-page .ap-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

#avis-page .mention {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.55;
    color: #55555b;
    max-width: 68ch;
    margin: 18px 0 0;
}

#avis-page .ap-kicker {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #55555b;
    margin-bottom: 14px;
}

/* Boutons : noir plein ou clair à filet. */
#avis-page .ap-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}
#avis-page .ap-bouton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border: 1px solid #111111;
    border-radius: 999px;
    background: #111111;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
#avis-page .ap-bouton:hover {
    background: #2C2C30;
    border-color: #2C2C30;
}
#avis-page .ap-bouton--clair {
    background: #ffffff;
    color: #111111;
    border-color: #D2D2D7;
}
#avis-page .ap-bouton--clair:hover {
    background: #F5F5F7;
    border-color: #111111;
}

/* Focus visible partout où l'on peut agir. */
#avis-page a:focus-visible,
#avis-page button:focus-visible,
#avis-page input:focus-visible,
#avis-page select:focus-visible,
#avis-page summary:focus-visible,
#avis-page .ap-avis:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}
#avis-page .ap-avis:focus:not(:focus-visible) { outline: none; }


/* ── 1. HERO ────────────────────────────────────────────────────────────────── */
#avis-page .ap-hero {
    background: #ffffff;
    padding: 136px 0 48px;   /* l'en-tête est fixe : place réservée au-dessus */
}
#avis-page .ap-titre {
    font-size: clamp(32px, 4.6vw, 52px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: #111111;
    margin: 0 0 18px;
    max-width: 20ch;
}
#avis-page .ap-chapo {
    font-size: 17px;
    line-height: 1.7;
    color: #55555b;
    max-width: 56ch;
    margin: 0;
}


/* ── 2. CORPS : 40/60 ───────────────────────────────────────────────────────── */
#avis-page .ap-corps {
    background: #ffffff;
    padding: 56px 0 88px;
    border-top: 1px solid #E8E8ED;
}
#avis-page .ap-chargement {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #55555b;
}
#avis-page .ap-layout {
    display: grid;
    grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
    gap: 64px;
    align-items: start;
}
#avis-page .ap-lateral {
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    padding: 4px;
}
#avis-page .ap-h2 {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #55555b;
    margin: 0 0 14px;
}


/* ── 3. RÉSUMÉ : moyenne et répartition ─────────────────────────────────────── */
#avis-page .ap-resume {
    padding-bottom: 28px;
    border-bottom: 1px solid #E8E8ED;
}
#avis-page .ap-resume-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin-bottom: 18px;
}
#avis-page .ap-moyenne {
    margin: 0;
    line-height: 1;
}
#avis-page .ap-moyenne-chiffre {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.04em;
}
#avis-page .ap-moyenne-sur {
    font-size: 20px;
    font-weight: 700;
    color: #55555b;
}
#avis-page .ap-nombre {
    flex-basis: 100%;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #55555b;
}

/* Étoiles : fond gris, étoiles jaunes rognées à note / 5 (largeur posée par le script). */
#avis-page .ap-etoiles {
    position: relative;
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 2px;
    white-space: nowrap;
}
#avis-page .ap-etoiles-grandes { font-size: 22px; }
#avis-page .ap-etoiles-fond { color: #D2D2D7; }
#avis-page .ap-etoiles-remplies {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #FFCC00;
}

/* Barres de répartition : chaque ligne est un bouton qui filtre sa note. */
#avis-page .ap-repartition {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}
#avis-page .ap-barre {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#avis-page .ap-barre:hover { background: #F5F5F7; }
#avis-page .ap-barre[aria-pressed="true"] {
    background: #F5F5F7;
    box-shadow: inset 0 0 0 1px #111111;
}
#avis-page .ap-barre-piste {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: #E8E8ED;
    overflow: hidden;
}
#avis-page .ap-barre-niveau {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #111111;
}
#avis-page .ap-barre-nombre {
    text-align: right;
    color: #55555b;
    font-weight: 600;
}


/* ── 4. FILTRES ─────────────────────────────────────────────────────────────── */
#avis-page .ap-filtres { padding-top: 28px; }
#avis-page .ap-champ { margin-bottom: 22px; }
#avis-page .ap-etiquette {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #111111;
}
#avis-page .ap-saisie {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #D2D2D7;
    border-radius: 12px;
    background: #ffffff;
    color: #111111;
    font-family: inherit;
    font-size: 16px;      /* 16 px : pas de zoom automatique sur téléphone */
    line-height: 1.3;
}
#avis-page .ap-saisie::placeholder { color: #6e6e75; }
#avis-page .ap-puces {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#avis-page .ap-puce {
    display: inline-flex;
    gap: 5px;
    padding: 8px 14px;
    border: 1px solid #D2D2D7;
    border-radius: 999px;
    background: #ffffff;
    color: #111111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
#avis-page .ap-puce:hover { border-color: #111111; }
#avis-page .ap-puce[aria-pressed="true"] {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}
#avis-page .ap-case {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
#avis-page .ap-case input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #111111;
}


/* ── 5. LISTE : filets fins, aucune carte ───────────────────────────────────── */
#avis-page .ap-entete-liste {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 20px;
    padding-bottom: 14px;
}
#avis-page .ap-entete-liste .ap-h2 { flex-basis: 100%; margin-bottom: 6px; }
#avis-page .ap-compteur {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
#avis-page .ap-classement,
#avis-page .ap-limite {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #55555b;
}
#avis-page .ap-limite { flex-basis: 100%; }
#avis-page .ap-effacer-zone { margin-left: auto; }
#avis-page .ap-effacer {
    padding: 0;
    border: 0;
    background: none;
    color: #111111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #FFCC00;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    cursor: pointer;
}
#avis-page .ap-effacer:hover { text-decoration-color: #111111; }

#avis-page .ap-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #E8E8ED;
}
#avis-page .ap-avis {
    padding: 26px 0;
    border-bottom: 1px solid #E8E8ED;
}
#avis-page .ap-avis-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}
#avis-page .ap-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border: 1px solid #D2D2D7;
    border-radius: 999px;
    background: #F5F5F7;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #111111;
}
#avis-page .ap-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FFCC00;
}
#avis-page .ap-avis-texte {
    margin: 12px 0 14px;
    font-size: 16px;
    line-height: 1.7;
    color: #111111;
    overflow-wrap: anywhere;
}
#avis-page .ap-avis-auteur {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
#avis-page .ap-avis-dates {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: #55555b;
}

#avis-page .ap-vide,
#avis-page .ap-message {
    padding: 28px 0;
    border-top: 1px solid #E8E8ED;
    border-bottom: 1px solid #E8E8ED;
}
#avis-page .ap-vide-texte,
#avis-page .ap-message-texte {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: #55555b;
    max-width: 56ch;
}
#avis-page .ap-message .ap-actions { margin-top: 18px; }
#avis-page .ap-plus-zone { margin: 28px 0 0; }


/* ── 6. COMMENT LES AVIS SONT CONTRÔLÉS ─────────────────────────────────────── */
#avis-page .ap-controle {
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid #E8E8ED;
    max-width: 68ch;
}
#avis-page .ap-controle summary {
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}
#avis-page .ap-controle-liste {
    margin: 14px 0 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.65;
    color: #55555b;
}
#avis-page .ap-controle-liste li { margin-bottom: 8px; }
#avis-page .ap-lien {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #111111;
    text-decoration: underline;
    text-decoration-color: #FFCC00;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
#avis-page .ap-lien:hover { text-decoration-color: #111111; }


/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    #avis-page .ap-hero { padding: 112px 0 32px; }
    #avis-page .ap-corps { padding: 40px 0 64px; }
    #avis-page .ap-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    #avis-page .ap-lateral {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0;
    }
}
@media (max-width: 640px) {
    #avis-page .ap-moyenne-chiffre { font-size: 46px; }
    #avis-page .ap-effacer-zone { margin-left: 0; flex-basis: 100%; }
}


/* ── MOUVEMENT RÉDUIT ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    #avis-page,
    #avis-page * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
