/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.65rem 1.5rem;
}

.breadcrumb-inner {
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.85rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.breadcrumb-inner a {
    color: #1a56db;
    text-decoration: none;
}

.breadcrumb-inner a:hover { text-decoration: underline; }
.breadcrumb-inner .sep { color: #cbd5e0; }
.breadcrumb-inner .current { color: #2d3748; font-weight: 500; }

.breadcrumb-inner .btn-back {
    display: inline-block;
    margin-left: auto;
    padding: 0;
    color: #1a56db;
}

/* ── Favoris + partage (page article) ──────────────────────── */
.article-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    border-top: 1px solid #f0f4f8;
}

.article-share-label {
    font-size: 0.85rem;
    color: #718096;
    margin-right: 0.15rem;
}

/* Réseaux sociaux : icône seule, dans un cercle — plus compact et directement reconnaissable
   (logo) sans avoir besoin du nom de la plateforme en toutes lettres. */
.article-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, transform 0.1s;
}

.article-share-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.article-share-icon:hover {
    border-color: #1a56db;
    color: #1a56db;
    transform: translateY(-1px);
}

/* "Copier le lien" garde un libellé (le texte change au clic, contrairement aux icônes sociales
   qui ouvrent un onglet externe), donc une pilule icône + texte plutôt qu'un cercle. */
.article-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.article-share-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.article-share-btn:hover {
    border-color: #1a56db;
    color: #1a56db;
}

.article-share-btn.is-copied {
    border-color: #15803d;
    color: #15803d;
}

/* ── Hero ─────────────────────────────────────────────────── */
.detail-hero {
    position: relative;
    background: linear-gradient(135deg, #1a56db 0%, #6c63ff 100%);
    padding: 2.5rem 1.5rem;
    color: #fff;
}

.detail-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

/* Positionné en absolu plutôt qu'en flux flex : le titre (souvent long, jusqu'à 2 lignes) prendrait
   toute la largeur disponible et ferait passer le bouton à la ligne suivante au lieu de rester à
   côté du titre. */
.detail-hero-actions {
    position: absolute;
    top: 2rem;
    right: 1.5rem;
    display: flex;
    gap: 0.6rem;
}

/* Bouton favori flottant sur le bandeau bleu du hero (fiche formation/métier) : un peu plus grand
   que dans les cartes de résultats, ombre portée pour bien se détacher du dégradé. */
.favori-toggle-hero {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* Bouton comparateur, uniquement sur les fiches formation (cf. templates/home/detail.html.twig) —
   même taille que le bouton favori juste à côté. */
.compare-toggle-hero {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* Sur .article-cover, le bouton n'est pas dans un wrapper .detail-hero-actions (le bandeau
   article est en une colonne centrée, pas en flex deux colonnes) : positionné directement. */
.article-cover .favori-toggle-hero {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.detail-title {
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.detail-etablissement {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 0.6rem;
}

.detail-etab-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.etab-type {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50px;
    padding: 0.25rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.detail-location {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ── Layout principal ─────────────────────────────────────── */
.detail-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.detail-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.detail-sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Cards ────────────────────────────────────────────────── */
.detail-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.detail-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f4f8;
}

.detail-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4a5568;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Le h2 gère déjà l'espacement avant la suite (padding-bottom + bordure) :
   pas besoin d'un espace supplémentaire quand un h3 le suit directement. */
.detail-card h2 + h3 {
    margin-top: 0;
}

.detail-card-subtitle {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.75rem;
}

/* ── Info grid (dl) ───────────────────────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.6rem 1rem;
    font-size: 0.9rem;
}

.info-grid dt {
    color: #718096;
    font-weight: 500;
    padding-top: 2px;
}

.info-grid dd {
    color: #2d3748;
    word-break: break-word;
}

.info-grid dd a {
    color: #1a56db;
    word-break: break-all;
}

.info-grid dd code {
    background: #f0f4f8;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-blue { background: #e8edff; color: #1a56db; }
.badge-red  { background: #fff0f0; color: #c53030; }
.badge-green { background: #ecfdf3; color: #15803d; }
.badge-gray { background: #f0f4f8; color: #4a5568; }

/* ── Grille de statistiques (résultats d'admission, etc.) ─────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.stat-tile {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: #f7fafc;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.stat-tile strong {
    font-size: 1.3rem;
    color: #1a56db;
}

.stat-tile span {
    font-size: 0.8rem;
    color: #718096;
}

/* ── Simulateur "mes chances d'admission" ─────────────────── */
/* Compense le header sticky (56px, cf. .site-header-inner) si on arrive ici via une ancre
   (#admission-sim-card) : sans ça, le haut de la carte se retrouve masqué en dessous. */
.admission-sim-card {
    scroll-margin-top: 76px;
}

.admission-sim-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0 1.25rem;
}

.admission-sim-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #4a5568;
}

.admission-sim-label .filter-select {
    max-width: none;
}

.admission-sim-result {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.admission-sim-verdict {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f0f4f8;
}

.admission-sim-verdict-detail {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.5;
}

.admission-sim-disclaimer {
    font-size: 0.8rem;
    color: #718096;
    font-style: italic;
    line-height: 1.5;
    margin-top: 0.85rem;
}

/* ── Carte ────────────────────────────────────────────────── */
.map-placeholder {
    margin-top: 1rem;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e8f0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    z-index: 0;
}

.map-loading { color: #718096; font-size: 0.9rem; }

/* ── Formations similaires ────────────────────────────────── */
.similar-formations-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.similar-formation-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f7fafc;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: background 0.15s;
}

.similar-formation-card:hover {
    background: #ebf2ff;
}

.similar-formation-body {
    min-width: 0;
}

.similar-formation-title {
    font-weight: 600;
    color: #1a202c;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-formation-meta {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 2px;
}

.similar-formation-distance {
    flex-shrink: 0;
    background: #e8edff;
    color: #1a56db;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Info raw ─────────────────────────────────────────────── */
.info-raw {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ── CTA ──────────────────────────────────────────────────── */
.cta-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* ── Carte "mise en avant" générique (guide d'admission, analyse éditoriale...) ──── */
.cta-highlight-card {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    background: linear-gradient(135deg, #eef3ff 0%, #ffffff 60%);
    border: 1px solid #dbe6ff;
}

.cta-highlight-card h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.cta-highlight-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #1a56db;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-highlight-icon svg {
    width: 22px;
    height: 22px;
}

.cta-highlight-body {
    min-width: 0;
}

.cta-highlight-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a56db;
    margin-bottom: 0.3rem;
}

.cta-highlight-body p {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

.cta-highlight-link {
    display: inline-block;
    background: #1a56db;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s;
}

.cta-highlight-link:hover {
    background: #1345b5;
}

@media (max-width: 640px) {
    .cta-highlight-card {
        flex-direction: column;
    }
}

.btn-primary {
    display: block;
    text-align: center;
    background: #1a56db;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-primary:hover { background: #1345b5; }

.btn-secondary {
    display: block;
    text-align: center;
    background: #f0f4f8;
    color: #2d3748;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-secondary:hover { background: #e2e8f0; }

/* .btn-secondary n'était jusqu'ici utilisée que sur des <a> ; un <button> a besoin de ce reset
   pour ne pas garder la bordure/largeur par défaut du navigateur (cf. guide/_ranking_section.html.twig). */
button.btn-secondary {
    width: 100%;
    margin-top: 0.75rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* ── Sessions list ────────────────────────────────────────── */
.sessions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sessions-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #2d3748;
    text-decoration: none;
    transition: background 0.15s;
}

.sessions-list a:hover { background: #f0f4f8; }
.sessions-list a.active { background: #ebf2ff; color: #1a56db; font-weight: 600; }

.current-tag {
    font-size: 0.7rem;
    background: #1a56db;
    color: #fff;
    padding: 1px 7px;
    border-radius: 20px;
}

/* ── Back ─────────────────────────────────────────────────── */
.btn-back {
    display: block;
    text-align: center;
    color: #718096;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.15s;
}

.btn-back:hover { background: #f0f4f8; color: #2d3748; }

/* ── Métiers ──────────────────────────────────────────────── */
.metiers-card h3 { margin-bottom: 0.75rem; }

.metiers-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metier-domaine {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a0aec0;
    margin-top: 0.75rem;
    padding: 0 0.25rem;
}

.metier-domaine:first-child { margin-top: 0; }

.metier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #2d3748;
    transition: background 0.15s;
}

.metier-item:hover { background: #f7fafc; }

.metier-item a {
    color: #1a56db;
    text-decoration: none;
    flex: 1;
}

.metier-item a:hover { text-decoration: underline; }

.metier-code {
    font-size: 0.7rem;
    background: #e2e8f0;
    color: #718096;
    padding: 1px 7px;
    border-radius: 20px;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* ── Texte intro auto-généré ──────────────────────────────── */
.detail-intro p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 0.9rem;
    font-size: 0.97rem;
}
.detail-intro p:last-child { margin-bottom: 0; }
.detail-intro strong { color: #1a202c; }
.detail-intro em { color: #2d3748; font-style: italic; }
.detail-intro code {
    background: #f0f4f8;
    color: #1a56db;
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 0.88rem;
    font-family: monospace;
}
.detail-intro a {
    color: #1a56db;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #bee3f8;
    transition: color 0.15s, border-color 0.15s;
}
.detail-intro a:hover {
    color: #1345b5;
    border-bottom-color: #1345b5;
}
.intro-complement {
    background: #f8faff;
    border-left: 3px solid #bee3f8;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem !important;
    color: #4a5568 !important;
    font-size: 0.9rem !important;
    margin-top: 0.5rem;
}

.detail-updated {
    color: #a0aec0 !important;
    font-size: 0.82rem !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-section h2 { margin-bottom: 1rem; }

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    border-bottom: 1px solid #f0f4f8;
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
    font-size: 0.97rem;
    font-weight: 700;
    color: #1a202c;
    padding: 1rem 2rem 1rem 0;
    cursor: pointer;
    position: relative;
    list-style: none;
    display: block;
    user-select: none;
    transition: color 0.15s;
}

.faq-question::after {
    content: '▾';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #a0aec0;
    transition: transform 0.2s;
}

.faq-item.open .faq-question { color: #1a56db; }
.faq-item.open .faq-question::after { transform: translateY(-50%) rotate(180deg); color: #1a56db; }

.faq-question:hover { color: #1a56db; }

.faq-answer {
    font-size: 0.93rem;
    color: #4a5568;
    line-height: 1.75;
    padding: 0 0 1rem 0;
    display: none;
}

.faq-item.open .faq-answer { display: block; }

.faq-answer a {
    color: #1a56db;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #bee3f8;
}
.faq-answer a:hover { color: #1345b5; border-bottom-color: #1345b5; }
.faq-answer strong { color: #2d3748; }

/* ── Article éditorial (formation) ───────────────────────────
   Typographie distincte du reste du site : bandeau "une" en dégradé, corps
   en une seule colonne de lecture, police serif pour le titre — pour bien
   marquer "ceci est un article" plutôt qu'une fiche de données. ── */
.article-cover {
    position: relative;
    background: linear-gradient(135deg, #1a56db 0%, #6c63ff 100%);
    padding: 2.25rem 1.5rem 1.75rem;
}

.article-cover-inner {
    max-width: 720px;
    margin: 0 auto;
}

.article-headline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 0.85rem;
}

.article-lead {
    font-size: 1.05rem;
    color: #e8edff;
    line-height: 1.55;
    font-style: italic;
    margin-bottom: 1rem;
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #c7d2fe;
}

.article-byline-dot {
    opacity: 0.6;
}

.article-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

/* ── Chiffre clé mis en avant (pull-quote) ── */
.article-highlight {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    background: #f7fafc;
    border-left: 4px solid #1a56db;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}

.article-highlight-value {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #1a56db;
    line-height: 1;
}

.article-highlight-label {
    font-size: 0.95rem;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-section {
    margin-bottom: 2rem;
}

.article-section h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.75rem;
}

.article-section p {
    font-size: 1.05rem;
    color: #2d3748;
    line-height: 1.8;
}

/* Lettrine sur le premier paragraphe, effet "ouverture d'article" classique. */
.article-dropcap::first-letter {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: #1a56db;
    float: left;
    line-height: 0.8;
    margin: 0.1rem 0.4rem 0 0;
}

.article-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f4f8;
}

.article-cta-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1a202c;
    transition: background 0.15s;
}

.article-cta-link:hover {
    background: #e2e8f0;
}

.article-cta-primary {
    background: #1a56db;
    color: #fff;
}

.article-cta-primary:hover {
    background: #1345b5;
}

/* Maillage interne : formations similaires, liens vers d'autres articles. Même
   fond sombre que le bloc "Le Mag" de la home (cf. .home-mag-section dans
   home.css) pour rattacher visuellement cette section à l'identité du Mag. */
.article-related {
    margin-top: 2.5rem;
    background: #1a202c;
    border-radius: 20px;
    padding: 2rem 2.25rem;
}

.article-related-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.article-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.article-related-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.article-related-link {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #7c9dfa;
    text-decoration: none;
    line-height: 1.4;
}

.article-related-link:hover {
    text-decoration: underline;
}

.article-related-meta {
    font-size: 0.85rem;
    color: #cbd5e0;
}

/* ── Avis (cf. templates/_avis_section.html.twig) ────────────── */
.avis-summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.avis-summary-stars,
.avis-item-stars {
    color: #f5a623;
    letter-spacing: 1px;
}

.avis-summary-total {
    color: #a0aec0;
    font-size: 0.85rem;
}

.avis-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.avis-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.avis-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.avis-item-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.avis-item-pseudo {
    font-weight: 700;
    color: #1a202c;
    font-size: 0.9rem;
}

.avis-item-date {
    color: #a0aec0;
    font-size: 0.8rem;
}

.avis-item-text {
    margin: 0.4rem 0 0;
    color: #4a5568;
    font-size: 0.92rem;
    line-height: 1.5;
}

.avis-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.avis-form h3 {
    margin: 0;
    font-size: 1rem;
}

.avis-form-stars {
    display: flex;
    gap: 0.25rem;
}

.avis-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
    color: #f5a623;
    padding: 0;
    line-height: 1;
}

.avis-form textarea,
.avis-form input[type="text"] {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

/* Honeypot anti-spam (cf. AvisController::submit()) : masqué visuellement et pour les lecteurs
   d'écran, mais toujours présent dans le DOM/tabulable pour qu'un remplissage automatique de
   formulaire par un bot le cible quand même — jamais display:none, qui échapperait aux bots
   les plus élémentaires (qui ignorent souvent ce cas précis). */
.avis-form-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    left: -9999px;
}

/* .btn-primary était pensée pour un <a> (display:block, sans reset des styles natifs du
   navigateur) : sur un vrai <button>, la bordure/police par défaut du navigateur restait visible
   par-dessus, d'où un rendu peu soigné — même correctif que .btn-secondary pour guide-rankings. */
.avis-form button.btn-primary {
    align-self: flex-start;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
}

.avis-form button.btn-primary:active {
    transform: scale(0.97);
}

/* Même palette que les badges de statut ailleurs sur le site (.badge-green/.badge-red, cf.
   guide/_ranking_section.html.twig) : un bandeau coloré se voit davantage qu'un simple texte,
   sans introduire une nouvelle palette. */
.avis-form-message {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
}

.avis-form-message:empty {
    display: none;
}

.avis-form-message.is-success {
    color: #15803d;
    background: #ecfdf3;
    padding: 0.65rem 0.9rem;
}

.avis-form-message.is-error {
    color: #c53030;
    background: #fff0f0;
    padding: 0.65rem 0.9rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .detail-hero-inner { flex-direction: column; }
    .detail-container { flex-direction: column; }
    .detail-sidebar { width: 100%; }
    .info-grid { grid-template-columns: 1fr; }
    .info-grid dt { color: #a0aec0; font-size: 0.8rem; margin-bottom: -4px; }
    /* Les boutons favori + comparateur (position absolue, cf. .detail-hero-actions) chevaucheraient
       sinon le titre, souvent sur 2-3 lignes à cette largeur : on leur réserve de la place à droite.
       5.5rem couvre le cas à deux boutons (fiche formation) ; un peu large sur une fiche métier
       (un seul bouton favori) mais sans rien casser, juste un peu plus de marge. */
    .detail-hero-left { padding-right: 5.5rem; }
    .detail-hero-actions { top: 1.75rem; right: 1rem; }
    .favori-toggle-hero, .compare-toggle-hero { width: 2.25rem; height: 2.25rem; font-size: 1.1rem; }

    /* Même chevauchement que .detail-hero-left ci-dessus, mais sur .article-cover (page article) :
       le bouton y est positionné directement sur .article-cover (pas de wrapper .detail-hero-actions,
       cf. commentaire plus haut), donc les mêmes ajustements s'appliquent à .article-cover-inner. */
    .article-cover-inner { padding-right: 3rem; }
    .article-cover .favori-toggle-hero { top: 1.25rem; right: 1rem; width: 2.25rem; height: 2.25rem; font-size: 1.1rem; }
}

/* ── Pages légales (cf. templates/legal/*.html.twig) ─────────
   Contenu texte long dans une .detail-card : espacement de lecture pour paragraphes et listes,
   absents ailleurs sur les fiches (surtout composées de champs structurés, pas de prose). */
.legal-content p {
    line-height: 1.65;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content ul {
    margin: 0.5rem 0 0.75rem 1.25rem;
    line-height: 1.65;
    color: #2d3748;
}

.legal-content li {
    margin-bottom: 0.4rem;
}

.legal-content a {
    color: #1a56db;
}
