/*
 * Psychouak — feuille de style unique.
 * Direction : Bauhaus adouci. Formes simples (cercle, carré, triangle) et couleurs vert / jaune / rouge,
 * traits fins, coins arrondis, ombres légères, grain de papier et trames discrètes en fond.
 * Mobile d'abord, à partir de 360 px. Aucune police externe : on s'appuie sur les géométriques du système.
 */

:root {
    /* Papier et encre */
    --papier: #f3eee2;
    --papier-fonce: #e8e0cc;
    --surface: #fffdf7;
    --encre: #1e2b28;
    --discret: #59615c;
    --bord: #e3dccb;
    --ligne: #ddd5c3;
    --ligne-forte: #c4bba6;

    /* Couleurs franches */
    --vert: #1f6f5f;
    --vert-fonce: #123f37;
    --vert-pale: #dcebe3;
    --jaune: #f2bb45;
    --jaune-pale: #fbefcc;
    --rouge: #d65f40;
    --rouge-pale: #f9e0d7;

    /* Anciennes variables, conservées pour les styles qui les citent encore */
    --accent: var(--vert);
    --accent-fonce: var(--vert-fonce);
    --accent-pale: var(--vert-pale);
    --accent-bord: #9cc5b6;
    --soleil: var(--jaune);
    --soleil-pale: var(--jaune-pale);
    --danger: #b03a20;
    --danger-pale: var(--rouge-pale);
    --attente: #7a4d00;
    --succes: #1d6b34;
    --succes-pale: #e1f2e5;
    --info: var(--vert-fonce);
    --info-pale: var(--vert-pale);
    --creux: #f8f4ea;
    --bord-fort: #858b86;

    --trait: 1px solid var(--ligne);
    --ombre: 0 1px 2px rgba(30, 43, 40, 0.05), 0 6px 18px rgba(30, 43, 40, 0.06);
    --ombre-petite: 0 1px 2px rgba(30, 43, 40, 0.08);
    --ombre-forte: 0 2px 6px rgba(30, 43, 40, 0.06), 0 16px 36px rgba(30, 43, 40, 0.11);
    --rayon: 14px;
    --rayon-petit: 9px;

    --geo: "Avenir Next", Avenir, "Segoe UI Variable Display", "Segoe UI", "Century Gothic", system-ui, sans-serif;
    --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --titres: var(--geo);

    /* Textures (images SVG embarquées : autorisées par la politique de sécurité, pas de requête en plus) */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.12 0 0 0 0 0.11 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
    --points: radial-gradient(circle, rgba(30, 43, 40, 0.12) 1px, transparent 1.3px);
    --hachures: repeating-linear-gradient(-45deg, rgba(30, 43, 40, 0.07) 0 1px, transparent 1px 7px);
    --frise: linear-gradient(90deg, var(--vert) 0 40%, var(--jaune) 40% 70%, var(--rouge) 70% 85%, var(--vert-fonce) 85% 100%);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--grain), var(--papier);
    color: var(--encre);
    font-family: var(--texte);
    font-size: 1rem;
    line-height: 1.55;
}

h1, h2, h3 { font-family: var(--geo); font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.08; margin: 0 0 0.9rem; letter-spacing: -0.025em; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 1.6rem 0 0.6rem; }
h3 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 0.35rem; }
p { margin: 0 0 0.75rem; }
ul, ol { margin: 0 0 0.75rem; padding-left: 1.25rem; }

a { color: var(--vert-fonce); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--vert); text-decoration-color: var(--jaune); text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
main:focus { outline: none; }
::selection { background: var(--jaune); color: var(--encre); }

[hidden] { display: none !important; }

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

.evitement {
    position: absolute; left: 0.5rem; top: -4rem; z-index: 30;
    background: var(--jaune); color: var(--encre); padding: 0.5rem 0.75rem; border: var(--trait); font-weight: 700;
}
.evitement:focus { top: 0.5rem; }

.discret { color: var(--discret); font-size: 0.9rem; font-weight: normal; font-family: var(--texte); letter-spacing: 0; text-transform: none; }
.aide { color: var(--discret); font-size: 0.875rem; margin: 0.25rem 0 0; }
.requis { color: var(--discret); font-size: 0.85rem; font-weight: normal; text-transform: none; letter-spacing: 0; }
.sans-coupure { white-space: nowrap; }

/* Petite étiquette en capitales, très utilisée (intertitres de facettes, en-têtes de tableaux…). */
.surtitre, .facette h2, .fiche-etiquettes dt, .tableau thead th, .definitions dt, .fiche-cote h2, .noter legend {
    font-family: var(--geo); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
}

/* ---------- En-tête ---------- */

.entete {
    position: sticky; top: 0; z-index: 20;
    background: var(--surface); border-bottom: var(--trait);
}
/* Frise de couleurs sous l'en-tête : la signature graphique du site. */
.entete::after { content: ""; display: block; height: 6px; background: var(--frise); border-bottom: var(--trait); }
.entete-interieur {
    max-width: 1240px; margin: 0 auto; padding: 0.5rem 1rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.25rem;
}
.logo {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: var(--geo); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em;
    color: var(--encre); text-decoration: none;
}
.logo img { display: block; width: 36px; height: 36px; }
.logo:hover { color: var(--vert); text-decoration: none; }

.menu { flex: 1 1 auto; }
.menu ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.15rem; margin: 0; padding: 0; }
.menu a {
    display: inline-block; padding: 0.35rem 0.55rem; border: 2px solid transparent;
    color: var(--encre); text-decoration: none; font-family: var(--geo); font-size: 0.95rem; font-weight: 500; white-space: nowrap;
}
.menu a:hover { border-color: var(--encre); background: var(--jaune-pale); color: var(--encre); text-decoration: none; }
.menu a[aria-current="page"] { background: var(--encre); border-color: var(--encre); color: var(--papier); font-weight: 600; }
.entete-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.entete-actions form { margin: 0; }
.lien-compte {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--encre); font-weight: 600; text-decoration: none; font-family: var(--geo);
}
.lien-compte::before {
    content: ""; width: 0.85rem; height: 0.85rem; border-radius: 50%; background: var(--jaune); border: 1px solid var(--ligne-forte);
}
.lien-compte:hover { text-decoration: underline; }
.pastille-nombre {
    display: inline-block; min-width: 1.35rem; padding: 0 0.35rem; margin-left: 0.3rem;
    background: var(--jaune); color: var(--encre); border: 1px solid var(--ligne-forte); border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; text-align: center; line-height: 1.35;
}

/* ---------- Pages sans compte (connexion, installation) : composition géométrique ---------- */

.invite { position: relative; overflow-x: hidden; }
.invite::before, .invite::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
/* Grand disque jaune en haut à droite, quart de cercle vert et triangle rouge en bas à gauche. */
.invite::before {
    top: -9rem; right: -7rem; width: 26rem; height: 26rem; border-radius: 50%;
    background: var(--hachures), var(--jaune); border: var(--trait);
}
.invite::after {
    left: -2rem; bottom: -2rem; width: 22rem; height: 22rem;
    background:
        linear-gradient(to top right, var(--rouge) 0 49.5%, transparent 50%) 9rem 100% / 13rem 11rem no-repeat,
        radial-gradient(circle at 0 100%, var(--vert) 0 70%, transparent 70.5%) 0 100% / 15rem 15rem no-repeat;
}
.invite .entete { position: static; background: none; border: 0; }
.invite .entete::after { display: none; }
.invite .entete-interieur { justify-content: center; padding-top: 2.5rem; }
.invite .logo { font-size: 2rem; gap: 0.75rem; }
.invite .logo img { width: 54px; height: 54px; }

/* ---------- Mise en page ---------- */

.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.75rem 1rem 3.5rem; flex: 1 0 auto; }
.pied {
    width: 100%; margin: 0; padding: 1.1rem 1rem; border-top: var(--trait);
    background: var(--points) 0 0 / 12px 12px, var(--papier-fonce);
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; font-size: 0.88rem;
}
.pied a { color: var(--encre); font-family: var(--geo); font-weight: 500; }
.invite .pied { background: none; border: 0; }

.carte {
    background: var(--surface); border: var(--trait);
    padding: 1.15rem 1.3rem; margin: 0 0 1.1rem;
}
.carte > :last-child { margin-bottom: 0; }
.carte > h2:first-child, .carte > h1:first-child { margin-top: 0; }
.carte-etroite {
    max-width: 27rem; margin: 1.5rem auto 2.5rem; padding: 1.8rem 1.7rem 1.5rem;
    box-shadow: var(--ombre-forte);
}
.carte-etroite h1 { font-size: 2rem; }
.carte-etroite .bouton-principal { width: 100%; text-align: center; padding: 0.75rem 1rem; }
.texte { max-width: 50rem; }
.texte h2 { display: flex; align-items: center; gap: 0.6rem; }
.texte h2::before { content: ""; flex: none; width: 0.8rem; height: 0.8rem; background: var(--jaune); border: 1px solid var(--ligne-forte); }
fieldset.carte { min-width: 0; }
fieldset.carte > legend {
    font-family: var(--geo); font-weight: 700; font-size: 1.05rem; padding: 0.15rem 0.7rem; margin-left: -0.3rem;
    background: var(--encre); color: var(--papier);
}
details.carte > summary { font-family: var(--geo); font-weight: 600; cursor: pointer; }
details.carte[open] > summary { margin-bottom: 0.75rem; }

.titre-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1.1rem; }
.titre-ligne h1 { margin: 0; }

/* ---------- Messages et bandeaux ---------- */

.message {
    padding: 0.75rem 1rem 0.75rem 3rem; border: var(--trait); margin: 0 0 1.1rem; position: relative;
    background: var(--surface);
}
.message::before {
    content: ""; position: absolute; left: 0.9rem; top: 0.95rem; width: 1.1rem; height: 1.1rem; border: 1px solid var(--ligne-forte);
}
.message > :last-child { margin-bottom: 0; }
.message-succes { background: var(--succes-pale); }
.message-succes::before { background: var(--vert); border-radius: 50%; }
.message-erreur { background: var(--rouge-pale); }
.message-erreur::before { border: 0; width: 1.3rem; background: var(--rouge); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.message-info { background: var(--jaune-pale); }
.message-info::before { background: var(--jaune); }

.bandeau {
    padding: 0.85rem 1rem; margin: 0 0 1.1rem; border: var(--trait);
    background: var(--hachures), var(--jaune-pale);
}
.bandeau-refusee { background: var(--hachures), var(--rouge-pale); }
.bandeau-archivee { background: var(--hachures), #e7e5df; }
.bandeau-brouillon { background: var(--hachures), var(--vert-pale); }
.bandeau-commentaire { margin: 0.4rem 0 0; padding: 0.5rem 0.7rem; background: var(--surface); border: 1px solid var(--ligne-forte); }

.badge {
    display: inline-block; padding: 0.05rem 0.45rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    background: var(--surface); color: var(--encre); border: 1px solid var(--ligne-forte); white-space: nowrap;
    font-family: var(--geo); vertical-align: middle;
}
.badge-attente, .badge-proposee, .badge-a_corriger, .badge-invite { background: var(--jaune); }
.badge-publiee, .badge-actif { background: var(--vert); color: #fff; }
.badge-refusee, .badge-suspendu { background: var(--rouge); color: #fff; }
.badge-brouillon { background: var(--vert-pale); }
.badge-archivee { background: #dedbd2; }

/* ---------- Boutons ---------- */

.bouton {
    display: inline-block; padding: 0.5rem 1rem; border: var(--trait);
    background: var(--surface); color: var(--encre); font: inherit; font-family: var(--geo); font-weight: 600; line-height: 1.3;
    text-decoration: none; cursor: pointer; box-shadow: var(--ombre-petite);
}
.bouton:hover { background: var(--jaune-pale); color: var(--encre); text-decoration: none; transform: translateY(-1px); box-shadow: var(--ombre-forte); }
.bouton:active { transform: none; box-shadow: var(--ombre-petite); }
.bouton-principal { background: var(--vert); color: #fff; }
.bouton-principal:hover { background: var(--vert-fonce); color: #fff; }
.bouton-danger { background: var(--surface); color: var(--danger); }
.bouton-danger:hover { background: var(--rouge); color: #fff; }
.bouton-petit { padding: 0.2rem 0.65rem; font-size: 0.86rem; font-weight: 600; box-shadow: var(--ombre-forte); }
.bouton-detail { font-weight: 400; font-size: 0.85rem; font-family: var(--texte); opacity: 0.9; }
.bouton-lien { background: none; border: 0; padding: 0; font: inherit; font-size: 0.92rem; color: var(--discret); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bouton-lien:hover { color: var(--encre); text-decoration-color: var(--jaune); text-decoration-thickness: 3px; }
.boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 0.9rem; }
.boutons-fin {
    position: sticky; bottom: 0; z-index: 4; margin-top: 1rem; padding: 0.85rem 1rem;
    background: var(--points) 0 0 / 10px 10px, var(--papier-fonce); border: var(--trait);
}

/* ---------- Formulaires ---------- */

.formulaire { max-width: 34rem; }
.formulaire-large { max-width: 56rem; }
.carte-etroite .formulaire { max-width: none; }
.champ { margin: 0 0 1rem; }
.champ-court { max-width: 8rem; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="search"], select, textarea {
    width: 100%; padding: 0.55rem 0.7rem; border: var(--trait); border-radius: 0;
    background: var(--surface); color: var(--encre); font: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--vert); box-shadow: 0 0 0 3px var(--vert-pale); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
input[type="file"] { max-width: 100%; font: inherit; }
input[type="file"]::file-selector-button {
    font: inherit; font-family: var(--geo); font-weight: 600; margin-right: 0.75rem; padding: 0.4rem 0.8rem;
    border: var(--trait); background: var(--jaune); color: var(--encre); cursor: pointer;
}
textarea { resize: vertical; }
input:disabled { background: #eee; color: #777; }
::placeholder { color: #8a8f88; }

.grille-champs { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.groupe-radio { border: 0; padding: 0; margin: 0.5rem 0 0; min-width: 0; }
.groupe-radio > legend { font-weight: 600; padding: 0; }
.radio, .case-a-cocher { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 400; margin: 0.5rem 0; }
.radio { padding: 0.6rem 0.75rem; border: 2px solid var(--bord); background: var(--surface); cursor: pointer; }
.radio:hover { border-color: var(--encre); }
.radio:has(input:checked) { border-color: var(--encre); background: var(--vert-pale); box-shadow: var(--ombre-petite); }
.radio input, .case-a-cocher input { margin-top: 0.3rem; flex: none; accent-color: var(--vert); width: 1.05rem; height: 1.05rem; }
.formulaire-ligne { display: flex; gap: 0.4rem; align-items: center; margin: 0; }
.formulaire-ligne select { width: auto; padding: 0.2rem 0.4rem; font-size: 0.92rem; }
.actions-ligne { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.actions-ligne form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.lien-a-copier { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.875rem; }

/* ---------- Sélecteur d'étiquettes (dépôt) ---------- */

.selecteur { padding: 1rem 0; border-top: 2px dashed var(--bord); }
.selecteur:first-of-type { border-top: 0; }
.selecteur > label { font-family: var(--geo); font-size: 1.02rem; }
.selecteur-choix { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.5rem; padding: 0; }
.selecteur-choix:empty { display: none; }
.selecteur-choix li {
    display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.25rem 0.12rem 0.65rem;
    background: var(--vert); color: #fff; border: var(--trait); font-size: 0.95rem; font-weight: 600;
}
.selecteur-choix button {
    border: 0; background: none; font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer;
    color: #fff; padding: 0.1rem 0.4rem;
}
.selecteur-choix button:hover { background: var(--rouge); }
.selecteur-saisie { position: relative; max-width: 30rem; }
.selecteur-suggestions {
    position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 0.3rem; list-style: none;
    background: var(--surface); border: var(--trait); box-shadow: var(--ombre);
    max-height: 16rem; overflow-y: auto;
}
.selecteur-suggestions li { padding: 0.4rem 0.6rem; cursor: pointer; }
.selecteur-suggestions li[aria-selected="true"], .selecteur-suggestions li:hover { background: var(--jaune-pale); }
.selecteur-suggestions .suggestion-vide { color: var(--discret); cursor: default; }
.selecteur-suggestions .suggestion-vide:hover { background: none; }
.suggestion-chemin { display: block; color: var(--discret); font-size: 0.82rem; }
.selecteur-parents { color: var(--discret); font-size: 0.875rem; margin: 0.35rem 0 0; min-height: 1.2em; }
.proposer { margin-top: 0.4rem; font-size: 0.95rem; }
.proposer > summary, .parcourir > summary { cursor: pointer; color: var(--vert-fonce); font-weight: 600; }
.proposer-corps { margin-top: 0.6rem; padding: 0.9rem; background: var(--creux); border: 2px solid var(--bord); max-width: 30rem; }

/* Suggestions tirées du titre et de la description. */
.selecteur-conseils {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.6rem; margin-top: 0.6rem;
    padding: 0.6rem 0.75rem; background: var(--hachures), var(--jaune-pale); border: var(--trait);
}
.selecteur-conseils-titre { font-size: 0.85rem; font-weight: 700; font-family: var(--geo); }
.conseils-liste { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.conseil {
    border: var(--trait); background: var(--surface); color: var(--encre); font: inherit; font-size: 0.9rem; font-weight: 600;
    padding: 0.1rem 0.6rem; cursor: pointer; box-shadow: var(--ombre-forte);
}
.conseil:hover { background: var(--vert); color: #fff; }

/* Parcours de l'arbre complet d'une facette. */
.parcourir { margin-top: 0.55rem; font-size: 0.95rem; }
.parcourir-arbre {
    margin-top: 0.5rem; padding: 0.7rem 0.8rem; max-height: 22rem; overflow-y: auto;
    background: var(--points) 0 0 / 12px 12px, var(--creux); border: var(--trait);
}
.parcourir-liste { list-style: none; margin: 0; padding: 0; }
.parcourir-liste .parcourir-liste { margin: 0.1rem 0 0.25rem 0.5rem; padding-left: 0.9rem; border-left: 1px solid var(--ligne-forte); }
.parcourir-liste li { margin: 0.25rem 0; }
.parcourir-etiquette {
    border: 1px solid var(--ligne-forte); background: var(--surface); color: var(--encre); font: inherit; font-size: 0.92rem;
    padding: 0.08rem 0.6rem; cursor: pointer;
}
.parcourir-etiquette:hover { background: var(--jaune-pale); }
.parcourir-etiquette[aria-pressed="true"] { background: var(--vert); color: #fff; font-weight: 600; }
.parcourir-etiquette[aria-pressed="true"]::before { content: "✓ "; }
.parcourir-synonymes { color: var(--discret); font-size: 0.82rem; }

/* Listes de fichiers (fiche et formulaire). */
.fichiers { list-style: none; margin: 0 0 1rem; padding: 0; border: var(--trait); background: var(--surface); }
.fichiers li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--ligne-forte); }
.fichiers li:last-child { border-bottom: 0; }
.fichiers li:nth-child(odd) { background: var(--creux); }
.fichiers .case-a-cocher { margin: 0; }
.fichier-type {
    flex: none; min-width: 3.2rem; text-align: center; padding: 0.15rem 0.4rem;
    background: var(--encre); color: var(--jaune); font-family: var(--geo); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
}
.fichier-nom { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.fichiers-choisis { margin: 0.4rem 0 0; padding-left: 1.2rem; font-size: 0.9rem; color: var(--discret); }
.fichiers-choisis:empty { display: none; }
.etiquette-champ { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; }
.fiche-sous-titre { margin-top: 1.25rem; }
.apercu-fichier { margin-bottom: 0.7rem; }
.apercu-fichier > summary { cursor: pointer; font-weight: 600; padding: 0.3rem 0; overflow-wrap: anywhere; }
.apercu-lien { margin: 0 0 0.4rem; font-size: 0.92rem; }

/* ---------- Recherche ---------- */

.barre-recherche {
    display: flex; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0.4rem;
    background: var(--surface); border: var(--trait); box-shadow: var(--ombre-forte);
}
.barre-recherche:focus-within { box-shadow: 0 0 0 4px var(--vert-pale), var(--ombre); }
.barre-recherche input[type="search"] {
    flex: 1 1 auto; min-width: 0; border: 0; font-size: 1.1rem;
    padding: 0.55rem 0.75rem 0.55rem 2.7rem; box-shadow: none; outline: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317201e' stroke-width='2.6' stroke-linecap='square'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E") no-repeat 0.8rem center / 1.25rem;
}
.barre-recherche .bouton { flex: none; box-shadow: none; background: var(--jaune); color: var(--encre); }
.barre-recherche .bouton:hover { background: var(--encre); color: var(--jaune); transform: none; }
.recherche { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }

.facettes { background: var(--surface); border: var(--trait); padding: 0.85rem 1rem; }
.facettes-repli > summary { font-family: var(--geo); font-weight: 700; cursor: pointer; }
.facette + .facette { border-top: 1px solid var(--ligne-forte); margin-top: 0.9rem; }
.facette h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0.9rem 0 0.4rem; color: var(--encre); }
/* Chaque axe a sa forme : cercle, carré, triangle… */
.facette h2::before { content: ""; flex: none; width: 0.8rem; height: 0.8rem; border: 1px solid var(--ligne-forte); background: var(--vert); border-radius: 50%; }
.facette:nth-of-type(5n+2) h2::before { background: var(--jaune); border-radius: 0; }
.facette:nth-of-type(5n+3) h2::before { border: 0; width: 0.95rem; background: var(--rouge); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.facette:nth-of-type(5n+4) h2::before { background: var(--encre); border-radius: 50% 50% 0 0; height: 0.5rem; }
.facette:nth-of-type(5n+5) h2::before { background: var(--hachures), var(--surface); }
.facette:first-of-type h2 { margin-top: 0.5rem; }
.facette-liste { list-style: none; margin: 0; padding: 0; }
.facette-liste .facette-liste { padding-left: 1.1rem; }
.facette-lien {
    display: flex; align-items: baseline; gap: 0.5rem; padding: 0.22rem 0.35rem;
    color: var(--encre); text-decoration: none; font-size: 0.95rem;
}
a.facette-lien:hover { background: var(--jaune-pale); text-decoration: none; color: var(--encre); }
.facette-nom { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.facette-lien.actif { font-weight: 700; background: var(--vert-pale); }
.facette-lien.vide { color: #6b706a; }
.case { flex: none; align-self: center; width: 1rem; height: 1rem; border: 1px solid var(--ligne-forte); background: var(--surface); }
.facette-lien.actif .case {
    background: var(--vert) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='square'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}
.facette-lien.vide .case { border-color: #c9c3b3; background: transparent; }
.compteur {
    flex: none; color: var(--encre); font-size: 0.74rem; font-weight: 700; font-family: var(--geo); font-variant-numeric: tabular-nums;
    background: var(--papier); padding: 0 0.4rem; line-height: 1.55;
}
.facette-lien.vide .compteur { color: #757a74; background: transparent; }
.sous-branche > summary, .tout-afficher > summary {
    cursor: pointer; color: var(--vert-fonce); font-size: 0.84rem; font-weight: 600; padding: 0.1rem 0.35rem;
}
.sous-branche > summary { margin-left: 1.5rem; }
.tout-afficher { margin-top: 0.25rem; }

.resultats-entete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.resultats-entete h2 { margin: 0 0 0.75rem; font-size: 1.45rem; }
.tris { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--discret); }
.tris a, .tris strong { margin-left: 0.5rem; }
.tris strong { color: var(--encre); background: var(--jaune); padding: 0 0.3rem; }

.pastilles { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0 0 1.1rem; padding: 0; }
.pastille {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0.65rem;
    background: var(--encre); color: var(--papier); text-decoration: none; font-size: 0.92rem; border: var(--trait);
}
.pastille:hover { background: var(--rouge); color: #fff; text-decoration: none; }
.pastille-facette { opacity: 0.75; }
.pastille-effacer { font-size: 0.9rem; margin-left: 0.3rem; font-weight: 600; }

.liste-ressources { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.ressource-carte {
    margin: 0; position: relative; padding-left: 1.6rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
/* Bande texturée à gauche de chaque carte, qui change de couleur de l'une à l'autre. */
.ressource-carte::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0.65rem;
    background: var(--hachures), var(--vert); border-right: var(--trait);
}
.liste-ressources > :nth-child(3n+2)::before { background: var(--hachures), var(--jaune); }
.liste-ressources > :nth-child(3n+3)::before { background: var(--hachures), var(--rouge); }
.ressource-carte:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); }
.ressource-carte h3 { font-size: 1.18rem; }
.ressource-carte h3 a, .ressource-carte h2 a { color: var(--encre); text-decoration: none; }
.ressource-carte h3 a::after, .ressource-carte h2 a::after { content: ""; position: absolute; inset: 0; }
.ressource-carte:hover h3 a, .ressource-carte:hover h2 a { text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 3px; }
.ressource-carte p { margin-bottom: 0.45rem; }
.ressource-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ressource-meta:empty { display: none; }
.etiquette {
    display: inline-block; padding: 0.04rem 0.5rem; background: var(--vert-pale);
    border: 1px solid var(--ligne-forte); color: var(--encre); font-size: 0.82rem; text-decoration: none;
}
a.etiquette { position: relative; z-index: 1; }
a.etiquette:hover { background: var(--jaune); color: var(--encre); text-decoration: none; }
.vide-resultat { background: var(--hachures), var(--surface); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.9rem; margin-top: 1.5rem; font-family: var(--geo); }
.onglets { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 1.1rem; border: var(--trait); width: fit-content; max-width: 100%; }
.onglets a {
    padding: 0.35rem 0.85rem; border-right: var(--trait); background: var(--surface); text-decoration: none;
    font-family: var(--geo); font-size: 0.93rem; color: var(--encre);
}
.onglets a:last-child { border-right: 0; }
.onglets a:hover { background: var(--jaune-pale); }
.onglets a[aria-current="page"] { background: var(--encre); color: var(--papier); }

/* ---------- Explorer par thème (accueil de la recherche) et carte des étiquettes ---------- */

.explorer { margin: 0 0 1.75rem; }
.explorer-entete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.75rem; }
.explorer-entete h2 { margin: 0; font-size: 1.45rem; }

.mosaique {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 0.6rem;
}
.tuile {
    position: relative; display: flex; flex-direction: column; min-height: 6.5rem; padding: 0.7rem 0.8rem 0.75rem;
    background: var(--surface); border: var(--trait); overflow: hidden;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tuile:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); }
/* Les textures alternent d'une tuile à l'autre. */
.tuile:nth-child(4n+2) { background: var(--points) 0 0 / 11px 11px, var(--surface); }
.tuile:nth-child(4n+3) { background: var(--hachures), var(--surface); }
.tuile:nth-child(4n+4) { background: var(--papier); }
.tuile-titre {
    font-family: var(--geo); font-weight: 700; font-size: 1.02rem; line-height: 1.2; color: var(--encre);
    text-decoration: none; padding-right: 2.6rem; overflow-wrap: break-word; hyphens: auto;
}
.tuile-titre::after { content: ""; position: absolute; inset: 0; }
.tuile:hover .tuile-titre { text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 3px; }
.tuile-nombre {
    position: absolute; top: 0.55rem; right: 0.6rem; min-width: 2rem; padding: 0.05rem 0.35rem; text-align: center;
    font-family: var(--geo); font-weight: 700; font-size: 0.95rem; background: var(--encre); color: var(--papier);
}
.tuile-sous { margin-top: auto; padding-top: 0.5rem; font-size: 0.8rem; color: var(--discret); }
.tuile-enfants { list-style: none; margin: auto 0 0; padding: 0.55rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem; position: relative; z-index: 1; }
.tuile-enfants a {
    display: inline-block; padding: 0.02rem 0.45rem; font-size: 0.8rem; line-height: 1.45; text-decoration: none;
    color: var(--encre); background: var(--surface); border: 1px solid var(--ligne-forte);
}
.tuile-enfants a:hover { background: var(--jaune); text-decoration: none; }
.tuile-enfants .n { font-weight: 700; margin-left: 0.15rem; color: var(--discret); }
.tuile-enfants .petits a { border-style: dashed; }
.tuile-action { position: relative; z-index: 1; align-self: flex-start; margin-top: 0.4rem; font-size: 0.78rem; }
.tuile-vide { background: var(--creux) !important; box-shadow: none; }
.tuile-vide .tuile-titre { color: #4d544f; }
.tuile-vide .tuile-nombre { background: #ebe7dc; color: #5d635e; }

/* Tuiles mises en avant : les thèmes les plus fournis prennent plus de place, en aplat de couleur. */
.tuile-grande { grid-column: span 2; grid-row: span 2; min-height: 13.6rem; padding: 1rem 1.1rem; background: var(--vert) !important; color: #fff; }
.tuile-grande .tuile-titre { color: #fff; font-size: 1.55rem; }
.tuile-grande .tuile-nombre { background: var(--jaune); color: var(--encre); font-size: 1.15rem; border: var(--trait); }
.tuile-grande .tuile-sous { color: #dbe9e3; }
/* Grand disque jaune qui déborde du coin : la touche Bauhaus. */
.tuile-grande::before {
    content: ""; position: absolute; right: -3.2rem; bottom: -3.2rem; width: 9rem; height: 9rem; border-radius: 50%;
    background: var(--hachures), var(--jaune); border: var(--trait); pointer-events: none;
}
.tuile-large { grid-column: span 2; background: var(--jaune) !important; }
.tuile-large::before {
    content: ""; position: absolute; right: 0; bottom: 0; width: 4.5rem; height: 4.5rem; pointer-events: none;
    background: linear-gradient(to top left, var(--rouge) 0 49%, transparent 50%);
}

/* Carte des étiquettes : une plaque par axe. */
.carte-etiquettes { display: grid; gap: 1.6rem; }
.plaque { border: var(--trait); background: var(--surface); box-shadow: var(--ombre-forte); }
.plaque-entete {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; padding: 0.75rem 1rem;
    border-bottom: var(--trait); background: var(--vert); color: #fff;
}
.plaque-entete h2 { margin: 0; font-size: 1.45rem; color: inherit; }
.plaque-entete .discret { color: inherit; opacity: 0.85; margin-left: auto; }
.plaque-corps { padding: 0.9rem; background: var(--points) 0 0 / 14px 14px, var(--papier); }
.forme { flex: none; width: 1.6rem; height: 1.6rem; border: 1px solid var(--ligne-forte); background: var(--jaune); border-radius: 50%; }
.plaque:nth-of-type(5n+2) .plaque-entete { background: var(--jaune); color: var(--encre); }
.plaque:nth-of-type(5n+2) .forme { background: var(--vert); border-radius: 0; }
.plaque:nth-of-type(5n+3) .plaque-entete { background: var(--rouge); }
.plaque:nth-of-type(5n+3) .forme { border: 0; width: 1.8rem; background: var(--jaune); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.plaque:nth-of-type(5n+4) .plaque-entete { background: var(--encre); color: var(--papier); }
.plaque:nth-of-type(5n+4) .forme { border-color: var(--papier); border-radius: 50% 50% 0 0; height: 0.9rem; background: var(--rouge); }
.plaque:nth-of-type(5n+5) .plaque-entete { background: var(--hachures), var(--vert-pale); color: var(--encre); }
.plaque:nth-of-type(5n+5) .forme { background: var(--encre); border-radius: 0 50% 0 50%; }
.plaque:nth-of-type(5n+2) .tuile-grande { background: var(--encre) !important; }
.plaque:nth-of-type(5n+3) .tuile-grande { background: var(--rouge) !important; }
.plaque:nth-of-type(5n+3) .tuile-grande::before { background: var(--hachures), var(--vert-pale); }

/* ---------- Fiche ---------- */

.fiche-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1rem; margin-bottom: 1.2rem; }
.fiche-entete h1 { margin: 0; flex: 1 1 16rem; }
.fiche-corps { display: grid; grid-template-columns: 1fr; gap: 1.2rem; align-items: start; }
.fiche-principal, .fiche-cote { background: var(--surface); border: var(--trait); padding: 1.25rem 1.35rem; }
.fiche-principal { box-shadow: var(--ombre-forte); }
.fiche-principal > :first-child, .fiche-cote > :first-child { margin-top: 0; }
.fiche-principal h2 { margin-top: 1.6rem; }
.fiche-cote { background: var(--points) 0 0 / 12px 12px, var(--creux); }
.fiche-cote h2 { margin: 1.2rem 0 0.5rem; padding-bottom: 0.3rem; border-bottom: var(--trait); }
.fiche-description { font-size: 1.1rem; line-height: 1.65; }
.fiche-acces { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1rem 0 0; }
.fiche-etiquettes { margin: 0; }
.fiche-etiquettes dt { color: var(--discret); margin-top: 0.8rem; }
.fiche-etiquettes dd { margin: 0.3rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.definitions { margin: 0 0 0.75rem; }
.definitions dt { color: var(--discret); margin-top: 0.65rem; }
.definitions dd { margin: 0; overflow-wrap: anywhere; }
.moderation-bloc { margin-top: 1.2rem; }
.carte.moderation-bloc { background: var(--hachures), var(--jaune-pale); }

/* Aperçu du fichier (PDF dans un cadre, image telle quelle). */
.apercu { margin-top: 1.6rem; }
.apercu-pdf {
    display: block; width: 100%; height: 70vh; min-height: 24rem; max-height: 62rem;
    border: var(--trait); background: #e9e6dd;
}
.apercu-image { display: block; max-width: 100%; height: auto; max-height: 40rem; border: var(--trait); background: #fff; }

/* ---------- Tableaux et arbre ---------- */

.tableau-defilant { overflow-x: auto; margin: 0 0 1.1rem; border: var(--trait); background: var(--surface); }
.tableau { width: 100%; border-collapse: collapse; }
.tableau th, .tableau td { padding: 0.6rem 0.8rem; border-bottom: 1.5px solid var(--bord); text-align: left; vertical-align: top; }
.tableau tbody tr:last-child th, .tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover { background: var(--jaune-pale); }
.tableau thead th { background: var(--encre); color: var(--papier); white-space: nowrap; border-bottom: 0; }
.tableau tbody th { font-weight: 600; }
.detail { display: block; font-size: 0.9rem; }

.arbre { list-style: none; margin: 0; padding: 0; }
.arbre .arbre { padding-left: 1.1rem; border-left: 1px solid var(--ligne-forte); margin-left: 0.4rem; }
.arbre-ligne { display: block; padding: 0.18rem 0; }
.arbre-action { font-size: 0.8rem; margin-left: 0.4rem; color: var(--discret); }

/* ---------- Mon compte : appareils connectés ---------- */

.appareils { list-style: none; padding: 0; margin: 0.75rem 0 1rem; border: var(--trait); }
.appareils li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; padding: 0.6rem 0.75rem; border-bottom: 1.5px solid var(--bord); }
.appareils li:last-child { border-bottom: 0; }
.appareil-nom { font-weight: 600; }
.appareils .discret { flex: 1 1 100%; font-size: 0.86rem; }
.appareils form { margin-left: auto; }

/* ---------- Notes et favoris ---------- */

.fiche-boutons { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.fiche-boutons form { margin: 0; }
.bouton-favori .favori-icone { color: var(--rouge); font-size: 1.1em; line-height: 1; }
.bouton-favori.actif { background: var(--rouge); color: #fff; }
.bouton-favori.actif .favori-icone { color: #fff; }

.carte-titre { display: flex; align-items: flex-start; gap: 0.75rem; }
.carte-titre h3, .carte-titre h2 { flex: 1; margin: 0 0 0.35rem; }
.carte-titre h2 { font-size: 1.18rem; }
.carte-titre form { margin: 0; position: relative; z-index: 1; }
.favori-bascule {
    width: 2.3rem; height: 2.3rem; border-radius: 50%; border: var(--trait); background: var(--surface);
    color: var(--encre); font-size: 1.15rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.favori-bascule:hover { background: var(--rouge-pale); color: var(--rouge); }
.favori-bascule.actif { color: #fff; background: var(--rouge); }
.ressource-archivee { opacity: 0.8; }
.note-courte { color: var(--encre); font-weight: 700; white-space: nowrap; }
.note-courte [aria-hidden] { color: var(--jaune); -webkit-text-stroke: 0.6px var(--encre); }

.avis { margin-bottom: 1.25rem; }
.avis-moyenne { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem; margin: 0.4rem 0 0.6rem; }
.avis-moyenne strong { font-family: var(--geo); font-size: 1.6rem; }
.etoiles { position: relative; display: inline-block; font-size: 1.15rem; letter-spacing: 0.08em; line-height: 1; color: #d5cdb8; }
.etoiles::before { content: "★★★★★"; }
.etoiles::after { content: "★★★★★"; position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--jaune); width: 0; -webkit-text-stroke: 0.6px var(--encre); }
.etoiles-1::after { width: 10%; }
.etoiles-2::after { width: 20%; }
.etoiles-3::after { width: 30%; }
.etoiles-4::after { width: 40%; }
.etoiles-5::after { width: 50%; }
.etoiles-6::after { width: 60%; }
.etoiles-7::after { width: 70%; }
.etoiles-8::after { width: 80%; }
.etoiles-9::after { width: 90%; }
.etoiles-10::after { width: 100%; }

.avis-repartition { list-style: none; padding: 0; margin: 0 0 0.9rem; font-size: 0.85rem; }
.avis-repartition li { display: grid; grid-template-columns: 2.2rem 1fr 1.6rem; align-items: center; gap: 0.4rem; margin: 0.1rem 0; }
.avis-barre { height: 0.6rem; background: var(--surface); border: 1px solid var(--ligne-forte); overflow: hidden; }
.avis-barre span { display: block; height: 100%; background: var(--jaune); width: 0; }
.largeur-1 { width: 10% !important; }
.largeur-2 { width: 20% !important; }
.largeur-3 { width: 30% !important; }
.largeur-4 { width: 40% !important; }
.largeur-5 { width: 50% !important; }
.largeur-6 { width: 60% !important; }
.largeur-7 { width: 70% !important; }
.largeur-8 { width: 80% !important; }
.largeur-9 { width: 90% !important; }
.largeur-10 { width: 100% !important; }

.noter fieldset { border: 0; padding: 0; margin: 0 0 0.5rem; }
.noter legend { margin-bottom: 0.3rem; padding: 0; color: var(--discret); }
.noter-etoiles { display: inline-flex; flex-direction: row-reverse; gap: 0.1rem; }
.noter-etoiles input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.noter-etoiles label { cursor: pointer; font-size: 1.9rem; line-height: 1; color: var(--encre); padding: 0 0.05rem; margin: 0; }
.noter-etoiles label::before { content: "☆"; }
.noter-etoiles input:checked ~ label::before,
.noter-etoiles label:hover::before, .noter-etoiles label:hover ~ label::before { content: "★"; }
.noter-etoiles input:checked ~ label, .noter-etoiles label:hover, .noter-etoiles label:hover ~ label { color: var(--jaune); -webkit-text-stroke: 1px var(--encre); }
.noter-etoiles:hover input:checked ~ label:not(:hover):not(:hover ~ label) { color: var(--encre); -webkit-text-stroke: 0; }
.noter-etoiles:hover input:checked ~ label:not(:hover):not(:hover ~ label)::before { content: "☆"; }
.noter-etoiles input:focus-visible + label { outline: 3px solid var(--jaune); outline-offset: 2px; }
.js .noter-valider { display: none; }

/* ---------- Finitions douces : coins arrondis, aplats apaisés ---------- */

h1, h2, h3 { font-weight: 650; }
.surtitre, .facette h2, .fiche-etiquettes dt, .tableau thead th, .definitions dt, .fiche-cote h2, .noter legend { letter-spacing: 0.08em; font-weight: 650; }

/* En-tête : la frise de couleurs fait office de bordure. */
.entete { border-bottom: 0; background: rgba(255, 253, 247, 0.92); backdrop-filter: saturate(1.3) blur(10px); }
.entete::after { height: 4px; border-bottom: 0; }
.logo img { border-radius: 9px; }
.menu a { border: 0; border-radius: 999px; padding: 0.4rem 0.7rem; }
.menu a:hover { background: var(--vert-pale); color: var(--vert-fonce); }
.menu a[aria-current="page"] { background: var(--vert-pale); color: var(--vert-fonce); }
.lien-compte::before { border: 0; }
.pastille-nombre { border: 0; }

.carte, .fiche-principal, .fiche-cote, .facettes, .tableau-defilant, .fichiers, .appareils, .proposer-corps, .parcourir-arbre,
.message, .bandeau, .selecteur-conseils, .boutons-fin, .tuile, .apercu-pdf, .apercu-image, .radio, .vide-resultat {
    border-radius: var(--rayon);
}
.carte, .fiche-principal, .facettes, .tableau-defilant { box-shadow: var(--ombre); }
.fiche-principal { box-shadow: var(--ombre); }
.carte-etroite { box-shadow: var(--ombre-forte); }
.fichiers, .appareils, .tableau-defilant { overflow: hidden; }
.fichiers li { border-bottom-color: var(--ligne); }
.fichier-type { border-radius: 6px; background: var(--vert-fonce); color: #fff; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="search"], select, textarea {
    border-radius: var(--rayon-petit); border-color: var(--ligne-forte);
}
input[type="file"]::file-selector-button { border-radius: 999px; background: var(--jaune-pale); border-color: var(--ligne-forte); }

.bouton { border-radius: 999px; border-color: var(--ligne-forte); box-shadow: var(--ombre-petite); }
.bouton:hover { background: var(--vert-pale); color: var(--vert-fonce); box-shadow: var(--ombre); }
.bouton-principal { border-color: var(--vert); }
.bouton-principal:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); color: #fff; }
.bouton-danger:hover { border-color: var(--rouge); }
.bouton-petit { box-shadow: none; }

fieldset.carte > legend { background: none; color: var(--encre); font-size: 1.15rem; padding: 0 0.5rem; }
fieldset.carte > legend::before {
    content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.5rem; border-radius: 50%;
    background: var(--jaune); vertical-align: 0.1em;
}

.message { border-color: transparent; }
.message::before { border: 0; }
.message-succes { border-color: #bcdcc4; }
.message-erreur { border-color: #efc4b8; }
.message-info { border-color: #ecd59c; }
.bandeau { border-color: #ecd59c; }
.bandeau-commentaire { border-radius: var(--rayon-petit); border-color: var(--ligne); }

.badge { border: 0; border-radius: 999px; padding: 0.1rem 0.55rem; letter-spacing: 0.05em; }
.badge-attente, .badge-proposee, .badge-a_corriger, .badge-invite { background: var(--jaune-pale); color: var(--attente); }
.badge-publiee, .badge-actif { background: var(--vert-pale); color: var(--vert-fonce); }
.badge-refusee, .badge-suspendu { background: var(--rouge-pale); color: var(--danger); }
.badge-brouillon, .badge-archivee { background: #ece9e1; color: #4a514d; }

.etiquette { border-radius: 999px; border-color: var(--accent-bord); color: var(--vert-fonce); padding: 0.05rem 0.6rem; }
a.etiquette:hover { background: var(--jaune-pale); border-color: var(--jaune); }
.selecteur-choix li { border-radius: 999px; border-color: var(--vert); }
.selecteur-choix button { border-radius: 999px; }
.selecteur-choix button:hover { background: var(--vert-fonce); }
.selecteur-suggestions { border-radius: var(--rayon-petit); box-shadow: var(--ombre-forte); }
.selecteur-suggestions li { border-radius: 6px; }
.conseil, .parcourir-etiquette { border-radius: 999px; box-shadow: none; border-color: var(--ligne-forte); }
.conseil { border-color: #e0c378; }
.conseil:hover { background: var(--vert-pale); color: var(--vert-fonce); border-color: var(--vert); }
.parcourir-liste .parcourir-liste { border-left-color: var(--vert-pale); }

/* Recherche */
.barre-recherche { border-radius: 999px; border: 1px solid var(--ligne-forte); box-shadow: var(--ombre); padding: 0.4rem 0.4rem 0.4rem 0.2rem; }
.barre-recherche input[type="search"] { border-radius: 999px; }
.barre-recherche .bouton { border-color: var(--vert); background: var(--vert); color: #fff; }
.barre-recherche .bouton:hover { background: var(--vert-fonce); color: #fff; }
.facette + .facette { border-top-color: var(--ligne); }
.facette h2::before { border: 0; }
.facette:nth-of-type(5n+5) h2::before { border: 1px solid var(--ligne-forte); }
.facette-lien { border-radius: 7px; }
.case { border-radius: 4px; border-color: var(--ligne-forte); }
.compteur { border-radius: 999px; background: var(--creux); color: var(--discret); font-weight: 600; }
.tris strong { border-radius: 6px; background: var(--jaune-pale); padding: 0.05rem 0.4rem; }
.pastille { border-radius: 999px; background: var(--vert-fonce); color: #fff; border: 0; padding: 0.25rem 0.75rem; }
.pastille:hover { background: var(--rouge); }
.onglets { border-radius: 999px; overflow: hidden; border-color: var(--ligne-forte); }
.onglets a { border-right-color: var(--ligne); }
.onglets a[aria-current="page"] { background: var(--vert); color: #fff; }

.ressource-carte { overflow: hidden; padding-left: 1.5rem; }
.ressource-carte::before { width: 0.35rem; border-right: 0; background: var(--vert); }
.liste-ressources > :nth-child(3n+2)::before { background: var(--jaune); }
.liste-ressources > :nth-child(3n+3)::before { background: var(--rouge); }
.ressource-carte:hover { box-shadow: var(--ombre-forte); }
.favori-bascule { border-color: var(--ligne-forte); }
.favori-bascule.actif { border-color: var(--rouge); }
/* L'état « en favori » doit rester visible même sous la souris : juste après le clic, le pointeur est encore sur le bouton,
   et le survol générique des boutons (fond vert pâle) masquait le fond rouge et le cœur blanc. */
.bouton-favori.actif, .bouton-favori.actif:hover { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.bouton-favori.actif:hover { background: #c24f32; }
.bouton-favori:not(.actif):hover .favori-icone { color: var(--rouge); }
.favori-bascule.actif:hover { background: #c24f32; color: #fff; }
.note-courte [aria-hidden], .etoiles::after { -webkit-text-stroke: 0; }
.noter-etoiles input:checked ~ label, .noter-etoiles label:hover, .noter-etoiles label:hover ~ label { -webkit-text-stroke: 0; }
.noter-etoiles label { color: var(--ligne-forte); }
.noter-etoiles:hover input:checked ~ label:not(:hover):not(:hover ~ label) { color: var(--ligne-forte); }
.avis-barre { border: 0; background: var(--papier-fonce); border-radius: 999px; }
.avis-barre span { border-radius: 999px; }

/* Fiche */
.fiche-cote h2 { border-bottom-color: var(--ligne); }
.tableau thead th { background: var(--creux); color: var(--discret); border-bottom: 1px solid var(--ligne); }
.tableau th, .tableau td { border-bottom-width: 1px; }
.tableau tbody tr:hover { background: #fbf7ec; }
.carte.moderation-bloc { background: var(--hachures), var(--jaune-pale); }

/* Mosaïques et carte des étiquettes : les formes Bauhaus restent, en aplats apaisés. */
.tuile { border-color: var(--ligne); box-shadow: var(--ombre-petite); }
.tuile:hover { box-shadow: var(--ombre-forte); }
.tuile-nombre { border-radius: 999px; background: var(--vert-pale); color: var(--vert-fonce); min-width: 1.9rem; }
.tuile-enfants a { border-radius: 999px; border-color: var(--ligne-forte); padding: 0.02rem 0.5rem; }
.tuile-enfants a:hover { background: var(--jaune-pale); border-color: var(--jaune); }
.tuile-grande { border-color: var(--vert); }
.tuile-grande .tuile-nombre { background: rgba(255, 255, 255, 0.2); color: #fff; border: 0; }
.tuile-grande .tuile-enfants a { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.tuile-grande .tuile-enfants a:hover { background: var(--jaune); color: var(--encre); }
.tuile-grande::before { border: 0; opacity: 0.95; }
.tuile-large { background: var(--jaune-pale) !important; border-color: #ecd59c; }
.tuile-large::before { width: 3.6rem; height: 3.6rem; border-bottom-right-radius: var(--rayon); background: linear-gradient(to top left, var(--rouge) 0 49%, transparent 50%); opacity: 0.85; }
.plaque { border: var(--trait); border-radius: calc(var(--rayon) + 4px); overflow: hidden; box-shadow: var(--ombre); }
.plaque-entete { border-bottom: 0; }
.forme { border: 0; }
.plaque:nth-of-type(5n+4) .plaque-entete { background: var(--vert-fonce); color: #fff; }
.plaque:nth-of-type(5n+4) .forme { background: var(--jaune); }
.plaque:nth-of-type(5n+2) .tuile-grande { background: var(--vert-fonce) !important; border-color: var(--vert-fonce); }
.plaque:nth-of-type(5n+3) .tuile-grande { border-color: var(--rouge); }

/* ---------- Lisibilité : le texte ne passe jamais sur les formes décoratives ---------- */

/* Le titre reste non positionné : son lien couvre toute la tuile. */
.tuile > :not(.tuile-titre) { position: relative; z-index: 1; }
.tuile::before { z-index: 0; }
.tuile-titre::after { z-index: 0; }
.tuile > .tuile-nombre { position: absolute; z-index: 1; }
/* Grande tuile : disque plus petit, rangé dans le coin, et texte qui s'arrête avant lui. */
.tuile-grande::before { width: 6.5rem; height: 6.5rem; right: -2.6rem; bottom: -2.6rem; opacity: 0.9; }
.tuile-grande .tuile-sous, .tuile-grande .tuile-enfants { padding-right: 3.6rem; }
.tuile-grande .tuile-sous { color: #f1f7f4; font-size: 0.86rem; line-height: 1.5; }
/* Tuile large : le triangle reste dans l'angle, le texte s'arrête avant. */
.tuile-large .tuile-sous, .tuile-large .tuile-enfants { padding-right: 3rem; }
.tuile-large .tuile-sous { color: #4d544f; }
.tuile-sous { color: #575e59; }

/* ---------- Critères des favoris ---------- */

.filtres-favoris {
    display: grid; grid-template-columns: 1fr; gap: 0 1rem; align-items: end;
    padding: 1rem 1.1rem 0.2rem; margin: 0 0 1rem;
    background: var(--points) 0 0 / 12px 12px, var(--surface); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre);
}
.filtres-favoris label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--discret); font-family: var(--geo); }
.filtres-boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 1rem; font-size: 0.92rem; }
@media (min-width: 640px) {
    .filtres-favoris { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
    .filtres-texte { grid-column: 1 / -1; }
}

/* ---------- Nouveautés depuis la dernière visite ---------- */

.nouveautes {
    position: relative; overflow: hidden; margin: 0 0 1.5rem; padding: 1rem 1.2rem 1rem 1.4rem;
    background: var(--points) 0 0 / 12px 12px, var(--jaune-pale); border: 1px solid #ecd59c; border-radius: var(--rayon);
}
.nouveautes::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0.35rem; background: var(--jaune); }
.nouveautes-entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.75rem; margin-bottom: 0.5rem; }
.nouveautes-entete h2 { margin: 0; font-size: 1.2rem; }
.nouveautes-nombre {
    display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; padding: 0 0.4rem; margin-right: 0.25rem;
    border-radius: 999px; background: var(--vert); color: #fff; font-size: 1rem; vertical-align: 0.05em;
}
.nouveautes-liste { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.25rem; }
.nouveautes-liste li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.nouveautes-liste li::before { content: ""; flex: none; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--vert); transform: translateY(-0.1em); }
.nouveautes-liste a { font-weight: 600; }
.nouveautes-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.92rem; }
.nouveautes-actions form { margin: 0 0 0 auto; }

/* ---------- Statistiques ---------- */

.chiffres-cles { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.chiffre {
    position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 0.9rem 1rem 0.85rem;
    background: var(--surface); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre);
}
.chiffre::after { content: ""; position: absolute; right: -1.4rem; top: -1.4rem; width: 4rem; height: 4rem; border-radius: 50%; background: var(--papier-fonce); }
.chiffre-vert::after { background: var(--vert-pale); }
.chiffre-jaune::after { background: var(--jaune-pale); border-radius: 0; transform: rotate(45deg); }
.chiffre-rouge::after { background: var(--rouge-pale); border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); right: -0.6rem; top: -0.4rem; }
.chiffre > * { position: relative; z-index: 1; }
.chiffre-valeur { font-family: var(--geo); font-weight: 650; font-size: 2rem; line-height: 1.1; color: var(--vert-fonce); font-variant-numeric: tabular-nums; }
.chiffre-libelle { font-weight: 600; }
.chiffre-detail { color: var(--discret); font-size: 0.86rem; }
.stats-grille { display: grid; grid-template-columns: 1fr; gap: 0 1.25rem; align-items: start; }
.stats-barre-cellule { display: flex; align-items: center; gap: 0.5rem; min-width: 9rem; }
.stats-barre { flex: 1 1 auto; height: 0.5rem; background: var(--papier-fonce); border-radius: 999px; overflow: hidden; }
.stats-barre span { display: block; height: 100%; background: var(--vert); border-radius: 999px; width: 0; }
.stats-etiquettes { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.etiquette-vide { background: var(--surface); border-style: dashed; }
.carte h3.surtitre { margin: 0.8rem 0 0.35rem; color: var(--discret); font-size: 0.72rem; }
.stats-classement { margin: 0; padding-left: 1.4rem; }
.stats-classement li { margin: 0.3rem 0; }
.stats-classement li::marker { font-family: var(--geo); font-weight: 650; color: var(--vert); }
.stats-nom { font-weight: 600; margin-right: 0.4rem; }
.stats-dormantes { margin: 0 0 0.5rem; padding-left: 1.2rem; }
@media (min-width: 900px) {
    .chiffres-cles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stats-grille { grid-template-columns: 1fr 1fr; }
    .stats-large { grid-column: 1 / -1; }
}

/* ---------- Assistant de recherche ---------- */

.lien-assistant { margin: -0.75rem 0 1.4rem 0.4rem; font-size: 0.95rem; }
.lien-assistant a { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--discret); }
.lien-assistant a strong { color: var(--vert-fonce); text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lien-assistant-avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; box-shadow: var(--ombre-petite); }
.assistant-formulaire label::before {
    flex: none; width: 0.9rem; height: 0.9rem; border-radius: 50%;
    background: conic-gradient(var(--vert) 0 25%, var(--jaune) 0 50%, var(--rouge) 0 75%, var(--vert-fonce) 0);
}
.sigmoteur-presentation { display: flex; align-items: center; gap: 1rem; }
.sigmoteur-presentation h1 { margin: 0; }
.sigmoteur-avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; box-shadow: var(--ombre); background: var(--vert-pale); }
.sigmoteur-devise { margin: 0.1rem 0 0; color: var(--discret); }
/* Bulle de dialogue : Sigmoteur parle. */
.sigmoteur-bulle {
    position: relative; margin: 0 0 1rem; padding: 0.7rem 0.95rem; max-width: 40rem;
    background: var(--vert-pale); color: var(--vert-fonce); border-radius: var(--rayon) var(--rayon) var(--rayon) 4px; font-size: 1rem;
}
.sigmoteur-coulisses { margin-top: 1rem; font-size: 0.92rem; }
.sigmoteur-coulisses > summary { cursor: pointer; color: var(--vert-fonce); font-weight: 600; }
.sigmoteur-coulisses[open] > summary { margin-bottom: 0.5rem; }
.sigmoteur-coulisses ul { margin-bottom: 0.5rem; }
.sigmoteur-coulisses p:last-child { margin-bottom: 0; }
.assistant { max-width: 56rem; }
.assistant-formulaire {
    padding: 1.1rem 1.2rem; margin: 0 0 1.25rem;
    background: var(--points) 0 0 / 12px 12px, var(--surface); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre);
}
.assistant-formulaire label { display: flex; align-items: center; gap: 0.55rem; font-family: var(--geo); font-size: 1.1rem; margin-bottom: 0.5rem; }
.assistant-formulaire label::before { content: ""; width: 1.1rem; height: 1.1rem; }
.assistant-formulaire textarea { font-size: 1.05rem; }
.assistant-avertissement {
    margin: 0.6rem 0 0.9rem; padding: 0.55rem 0.75rem; font-size: 0.88rem; color: #5a4a1c;
    background: var(--jaune-pale); border-radius: var(--rayon-petit);
}
.assistant-formulaire button[disabled] { opacity: 0.75; cursor: progress; }
.assistant-compris {
    margin: 0 0 1.25rem; padding: 0.9rem 1.1rem; border-left: 0.35rem solid var(--vert);
    background: var(--vert-pale); border-radius: 0 var(--rayon) var(--rayon) 0;
}
.assistant-compris p { margin-bottom: 0.5rem; }
.assistant-compris > :last-child { margin-bottom: 0; }
.assistant-liste { counter-reset: rang; }
.assistant-liste > li { counter-increment: rang; }
.assistant-liste > li h3::before {
    content: counter(rang); display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: 0.5rem;
    border-radius: 50%; background: var(--vert); color: #fff; font-size: 0.85rem; vertical-align: 0.1em;
}
.assistant-raison { font-size: 1rem; }
.assistant-autres { columns: 2 16rem; column-gap: 2rem; padding-left: 1.2rem; }
.assistant-autres li { break-inside: avoid; margin: 0.2rem 0; }

/* ---------- Écrans larges ---------- */

@media (min-width: 640px) {
    .grille-champs { grid-template-columns: 1fr 1fr; }
    .page { padding-left: 1.5rem; padding-right: 1.5rem; }
    .entete-interieur { padding-left: 1.5rem; padding-right: 1.5rem; }
    .mosaique { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
}

@media (min-width: 900px) {
    .recherche { grid-template-columns: 18rem minmax(0, 1fr); gap: 2rem; }
    .facettes-repli > summary { display: none; }
    .facettes { position: sticky; top: 5.2rem; max-height: calc(100vh - 6.2rem); overflow-y: auto; }
    .fiche-corps { grid-template-columns: minmax(0, 1fr) 19.5rem; gap: 1.6rem; }
    .explorer .mosaique { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
    /* Sur petit écran le menu passe sur plusieurs lignes : l'en-tête ne reste pas collé en haut. */
    .entete { position: static; }
    .invite::before { width: 16rem; height: 16rem; top: -6rem; right: -6rem; }
    .invite::after { transform: scale(0.6); transform-origin: 0 100%; }
}

@media (max-width: 480px) {
    .barre-recherche .bouton { padding-left: 0.8rem; padding-right: 0.8rem; }
    .apercu-pdf { height: 60vh; }
    .tuile-grande { min-height: 10rem; }
    .tuile-grande .tuile-titre { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    .bouton, .ressource-carte, .tuile { transition: none; }
    .bouton:hover, .ressource-carte:hover, .tuile:hover { transform: none; }
}

@media print {
    .entete, .pied, .facettes, .barre-recherche, .moderation-bloc, .bouton, .apercu, .favori-bascule, .noter { display: none !important; }
    body { background: #fff; }
    .fiche-principal, .ressource-carte { box-shadow: none; }
}

/* ---------- Limites de sécurité (administrateurs) ---------- */

.limites-bloques { list-style: none; margin: 0 0 0.6rem; padding: 0; border: var(--trait); border-radius: var(--rayon-petit); overflow: hidden; }
.limites-bloques li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--ligne); }
.limites-bloques li:last-child { border-bottom: 0; }
.limites-bloques li > span { display: flex; flex-direction: column; }
.limites-bloques form { margin: 0; }
.limites-autre { margin-top: 0.8rem; font-size: 0.95rem; }
.limites-autre > summary { cursor: pointer; color: var(--vert-fonce); font-weight: 600; margin-bottom: 0.5rem; }
.limites-autre select { width: auto; max-width: 100%; }
.limites-formulaire input[type="number"] {
    width: 7rem; padding: 0.4rem 0.55rem; border: 1px solid var(--ligne-forte); border-radius: var(--rayon-petit);
    background: var(--surface); font: inherit;
}
.limites-seuils { display: grid; grid-template-columns: 1fr; gap: 0 1.5rem; }
@media (min-width: 900px) { .limites-seuils { grid-template-columns: 1fr 1fr; } }

/* ---------- Parcours des membres (administrateurs) ---------- */

.parcours-filtres { grid-template-columns: 1fr; }
@media (min-width: 640px) { .parcours-filtres { grid-template-columns: 2fr 1fr auto; } }
.parcours-resume { margin: 0 0 1rem; }
.parcours-visite > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; }
.parcours-date { font-family: var(--geo); font-weight: 650; }
.parcours-etapes { list-style: none; margin: 0.8rem 0 0; padding: 0 0 0 0.3rem; border-left: 2px solid var(--vert-pale); }
.parcours-etapes li { display: grid; grid-template-columns: 3rem 5.6rem 1fr; align-items: baseline; gap: 0.6rem; padding: 0.3rem 0 0.3rem 0.8rem; position: relative; }
.parcours-etapes li::before {
    content: ""; position: absolute; left: -0.42rem; top: 0.7rem; width: 0.55rem; height: 0.55rem; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--ligne-forte);
}
.parcours-etapes time { font-variant-numeric: tabular-nums; color: var(--discret); font-size: 0.88rem; }
.parcours-type {
    justify-self: start; font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.05rem 0.45rem; border-radius: 999px; background: #ece9e1; color: #4a514d;
}
.parcours-libelle { overflow-wrap: anywhere; }
.parcours-fiche .parcours-type { background: var(--vert-pale); color: var(--vert-fonce); }
.parcours-fiche::before { border-color: var(--vert) !important; }
.parcours-telechargement .parcours-type, .parcours-apercu .parcours-type { background: var(--jaune-pale); color: var(--attente); }
.parcours-telechargement::before { background: var(--jaune) !important; border-color: var(--jaune) !important; }
.parcours-recherche .parcours-type, .parcours-assistant .parcours-type { background: #e6eef6; color: #1d3a5c; }
.parcours-connexion .parcours-type { background: var(--vert-fonce); color: #fff; }
.parcours-erreur .parcours-libelle, .parcours-erreur .parcours-libelle a { color: var(--danger); }
.parcours-erreur::before { border-color: var(--rouge) !important; }
@media (max-width: 480px) { .parcours-etapes li { grid-template-columns: 2.8rem 1fr; } .parcours-type { display: none; } }

/* ---------- Double authentification ---------- */

.champ-code { font-size: 1.6rem !important; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; max-width: 13rem; }
.verification-secours { margin: 1rem 0 0.5rem; display: flex; flex-direction: column; gap: 0.2rem; }
.carte-moyenne { max-width: 34rem; }
.etapes-a2f { padding-left: 1.3rem; }
.etapes-a2f > li { margin-bottom: 1.1rem; }
.qr-code { width: 220px; max-width: 100%; margin: 0.8rem 0; padding: 0.4rem; background: #fff; border: var(--trait); border-radius: var(--rayon-petit); }
.qr-code svg { display: block; width: 100%; height: auto; }
.cle-manuelle > summary { cursor: pointer; color: var(--vert-fonce); font-weight: 600; }
.cle-texte code { display: inline-block; padding: 0.4rem 0.6rem; font-size: 1.05rem; letter-spacing: 0.08em; background: var(--creux); border-radius: var(--rayon-petit); overflow-wrap: anywhere; }

/* ---------- Ressources proches ---------- */

.proches { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--ligne); }
.proches-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.proches-liste li {
    display: flex; flex-direction: column; gap: 0.1rem; padding: 0.6rem 0.8rem 0.6rem 1rem; position: relative;
    background: var(--creux); border-radius: var(--rayon-petit);
}
.proches-liste li::before { content: ""; position: absolute; left: 0; top: 0.6rem; bottom: 0.6rem; width: 3px; border-radius: 3px; background: var(--jaune); }
.proches-titre { font-weight: 600; }
.proches-extrait { font-size: 0.92rem; color: #3f4744; }
@media (min-width: 640px) { .proches-liste { grid-template-columns: 1fr 1fr; } }

/* ---------- Suivre un thème ---------- */

.suivre-themes { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: -0.4rem 0 1.1rem; }
.suivre-themes form { margin: 0; }
.bouton-suivre {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.7rem; cursor: pointer;
    font: inherit; font-size: 0.88rem; color: var(--vert-fonce); background: var(--surface);
    border: 1px solid var(--ligne-forte); border-radius: 999px;
}
.bouton-suivre:hover { border-color: var(--vert); background: var(--vert-pale); }
.bouton-suivre.actif { background: var(--vert); border-color: var(--vert); color: #fff; }
/* Cloche dessinée en CSS : un dôme et un battant. */
.suivre-icone { position: relative; width: 0.8rem; height: 0.85rem; flex: none; }
.suivre-icone::before {
    content: ""; position: absolute; left: 0.05rem; right: 0.05rem; top: 0; bottom: 0.18rem;
    border: 1.6px solid currentColor; border-radius: 0.45rem 0.45rem 0.1rem 0.1rem;
}
.suivre-icone::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 0.25rem; height: 0.18rem; margin-left: -0.125rem; border-radius: 0 0 0.2rem 0.2rem; background: currentColor; }
.bouton-suivre.actif .suivre-icone::before { background: currentColor; }
.tuile > .tuile-suivre { position: absolute; top: 0.5rem; right: 3.1rem; z-index: 2; margin: 0; }
.bouton-suivre-icone { padding: 0.28rem 0.38rem; }
.tuile-grande .bouton-suivre-icone:not(.actif) { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.tuile-grande .bouton-suivre-icone.actif { background: var(--jaune); border-color: var(--jaune); color: var(--encre); }
.tuile-titre { padding-right: 5.3rem; }

/* ---------- Préférences d'e-mails ---------- */

.preferences-courriel { margin-bottom: 1rem; }
.abonnements-liste { list-style: none; margin: 0.4rem 0 1.4rem; padding: 0; border: var(--trait); border-radius: var(--rayon-petit); overflow: hidden; }
.abonnements-liste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--ligne); }
.abonnements-liste li:last-child { border-bottom: 0; }
.abonnements-liste form { margin: 0; }

/* ---------- Mon compte ---------- */

.compte { max-width: 68rem; margin: 0 auto; }
.compte-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; padding: 1.4rem 1.5rem; }
.compte-identite { display: flex; align-items: center; gap: 1rem; }
.compte-identite h1 { margin: 0 0 0.15rem; font-size: 1.7rem; }
.compte-identite p { margin: 0.1rem 0; }
.compte-avatar {
    flex: none; display: grid; place-items: center; width: 4.2rem; height: 4.2rem; border-radius: 50%;
    font-family: var(--geo); font-weight: 650; font-size: 1.5rem; color: #fff; letter-spacing: 0.02em;
    background: conic-gradient(from 210deg, var(--vert) 0 60%, var(--vert-fonce) 0 80%, var(--jaune) 0 92%, var(--rouge) 0);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.compte-chiffres { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.compte-chiffres li > *, .compte-chiffres li {
    display: flex; flex-direction: column; align-items: center; min-width: 5.5rem; text-decoration: none; color: inherit;
}
.compte-chiffres li { padding: 0.5rem 0.7rem; border-radius: var(--rayon-petit); background: var(--creux); }
.compte-chiffres li:has(a):hover { background: var(--vert-pale); }
.compte-chiffres strong { font-family: var(--geo); font-size: 1.45rem; line-height: 1.1; color: var(--vert-fonce); }
.compte-chiffres span { font-size: 0.8rem; color: var(--discret); text-align: center; }
.compte-corps { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.2rem; }
.compte-menu { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.compte-menu a { padding: 0.35rem 0.8rem; border-radius: 999px; text-decoration: none; color: var(--vert-fonce); background: var(--surface); border: 1px solid var(--ligne); font-size: 0.93rem; }
.compte-menu a:hover { background: var(--vert-pale); }
.compte-sections .carte { scroll-margin-top: 5.5rem; }
.compte-sections h3.surtitre { margin: 1.3rem 0 0.5rem; color: var(--discret); }
.compte-sections h2 + h3.surtitre { margin-top: 0.4rem; }
.compte-depliant > summary { cursor: pointer; color: var(--vert-fonce); font-weight: 600; margin-bottom: 0.6rem; }
.compte-statut { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 0.6rem; }
.compte-statut p { margin: 0; }
.compte-pastille { flex: none; width: 0.9rem; height: 0.9rem; margin-top: 0.3rem; border-radius: 50%; background: var(--jaune); box-shadow: 0 0 0 4px var(--jaune-pale); }
.compte-pastille-forte { background: var(--vert); box-shadow: 0 0 0 4px var(--vert-pale); }
@media (min-width: 900px) {
    .compte-corps { grid-template-columns: 11rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
    .compte-menu { position: sticky; top: 5.5rem; flex-direction: column; }
    .compte-menu a { background: none; border-color: transparent; border-radius: var(--rayon-petit); }
    .compte-menu a:hover { background: var(--vert-pale); }
}

/* ---------- Demandes de ressources et fils de messages ---------- */

.pastille-douce { background: var(--vert-pale); color: var(--vert-fonce); }
.demandes-mise-en-page { display: grid; grid-template-columns: 1fr; gap: 1.2rem; align-items: start; }
@media (min-width: 900px) {
    .demandes-mise-en-page { grid-template-columns: 22rem minmax(0, 1fr); }
    .demande-nouvelle { position: sticky; top: 5.5rem; }
}
.demande-nouvelle h2 { margin-top: 0; }
.demande-carte::before { background: var(--jaune) !important; }
.demande-resolue::before { background: var(--vert) !important; }
.demande-fermee { opacity: 0.75; }
.demande-question { border-left: 4px solid var(--jaune); }
.fil-messages { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: 0.7rem; }
.message-fil { padding: 0.8rem 1rem; background: var(--surface); border: var(--trait); border-radius: var(--rayon); }
.message-fil > p { margin: 0 0 0.4rem; }
.message-fil > p:last-child { margin-bottom: 0; }
.message-fil-entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.message-fil-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.4rem 1rem; margin-top: 0.4rem; font-size: 0.9rem; }
.message-fil-actions form { margin: 0; }
.message-fil-actions details > summary { cursor: pointer; color: var(--discret); text-decoration: underline; }
.message-fil-actions details[open] { flex: 1 1 100%; }
.message-masque { background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(30, 43, 40, 0.04) 6px 12px), var(--creux); }
.reponse-ressource { font-weight: 600; }
.reponse-ressource::before { content: "↳ "; color: var(--vert); }
.retours { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--ligne); }
.retours .fil-messages .message-fil { background: var(--creux); border-color: transparent; }
.retour-formulaire label { font-weight: 600; }
.retour-formulaire textarea { margin-bottom: 0.3rem; }
