/* souris.click — charte graphique */
:root {
  --fond: #FFFBF4;
  --carte: #FFFFFF;
  --bord: #EDE4D6;
  --encre: #262139;
  --texte2: #5A5470;
  --corail: #E8613C;   /* décor uniquement (contraste insuffisant pour du texte) */
  --lien: #B23A12;     /* 5,9:1 sur le fond */
  --menthe: #1F7A70;   /* 5,3:1 */
  --menthe-clair: #E3F4F1;
  --corail-clair: #FDECE5;
  --lilas-clair: #EFECF7;
  --jaune-clair: #FFF4CC;
  --rayon: 18px;
  --titre: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;
  --corps: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font: 1.0625rem/1.65 var(--corps);
}
img { max-width: 100%; height: auto; }
a { color: var(--lien); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--menthe); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--titre); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.enveloppe { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.lecture { max-width: 720px; }

/* En-tête */
.entete { border-bottom: 1px solid var(--bord); background: var(--fond); }
.entete .enveloppe { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.marque { display: flex; align-items: center; gap: 8px; color: var(--encre); text-decoration: none; font: 700 1.2rem var(--titre); margin-right: auto; }
.marque img { width: 36px; height: 36px; }
.menu { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.menu a, .menu span { display: block; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--encre); font-weight: 600; font-size: .95rem; }
.menu a:hover { background: var(--lilas-clair); }
.menu a[aria-current="page"] { background: var(--encre); color: #fff; }
.menu span { color: var(--texte2); opacity: .7; cursor: default; }
.menu span small { font-weight: 400; font-size: .75rem; }
.langue { font-size: .9rem; }

/* Accueil */
.heros { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; padding: 40px 0 10px; }
.heros p.chapo { font-size: 1.2rem; color: var(--texte2); max-width: 34em; }
.heros img { width: min(300px, 70vw); justify-self: center; }
@media (max-width: 720px) { .heros { grid-template-columns: 1fr; padding-top: 24px; } .heros img { order: -1; width: 180px; } }

.voyage { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: etape; }
.voyage li { position: relative; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px 18px 16px; counter-increment: etape; }
.voyage li::before { content: counter(etape); position: absolute; top: -12px; left: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--corail); color: #fff; font: 700 .95rem/28px var(--titre); text-align: center; }
.voyage li:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 40%; color: var(--corail); font-weight: 700; font-size: 1.2rem; }
.voyage .icone { font-size: 2rem; line-height: 1; }
.voyage h3 { margin: .5em 0 .3em; }
.voyage p { margin: 0; font-size: .97rem; color: var(--texte2); }
@media (max-width: 820px) { .voyage { grid-template-columns: 1fr 1fr; } .voyage li::after { display: none; } }
@media (max-width: 480px) { .voyage { grid-template-columns: 1fr; } }

.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.carte { display: block; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px; color: var(--encre); text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.carte:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(38,33,57,.08); }
.carte h3 { margin-top: .2em; }
.carte p { margin: 0; color: var(--texte2); font-size: .97rem; }
.carte .etiquette { display: inline-block; margin-top: 12px; font-size: .85rem; font-weight: 600; color: var(--menthe); }
.carte.bientot { opacity: .75; }
.carte.bientot .etiquette { color: var(--texte2); }
.c-fai { background: var(--jaune-clair); } .c-dns { background: var(--menthe-clair); }
.c-vpn { background: var(--lilas-clair); } .c-tor { background: var(--corail-clair); }

.promesse { display: flex; gap: 10px 28px; flex-wrap: wrap; list-style: none; padding: 18px 22px; margin: 0; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); }
.promesse li::before { content: "✓ "; color: var(--menthe); font-weight: 700; }

/* Articles */
.fil { font-size: .9rem; color: var(--texte2); margin-top: 24px; }
.fil a { color: var(--texte2); }
.article { padding-bottom: 20px; }
.article .chapo { font-size: 1.15rem; color: var(--texte2); }
.bulle { display: flex; gap: 14px; align-items: flex-start; margin: 26px 0; }
.bulle img { width: 64px; flex: none; }
.bulle div { position: relative; background: var(--menthe-clair); border-radius: var(--rayon); padding: 14px 18px; }
.bulle div::before { content: ""; position: absolute; left: -9px; top: 22px; border: 10px solid transparent; border-right-color: var(--menthe-clair); border-left: 0; }
.bulle strong { display: block; font-family: var(--titre); }
.bulle p { margin: .2em 0 0; }

.etapes { list-style: none; padding: 0; margin: 18px 0; counter-reset: e; }
.etapes li { position: relative; padding: 4px 0 18px 52px; counter-increment: e; }
.etapes li::before { content: counter(e); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--encre); color: #fff; font: 700 1rem/34px var(--titre); text-align: center; }
.etapes li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 40px; bottom: 2px; width: 2px; background: var(--bord); }
.etapes strong { font-family: var(--titre); }

.encadre { background: var(--carte); border: 1px solid var(--bord); border-left: 5px solid var(--menthe); border-radius: 10px; padding: 14px 18px; margin: 20px 0; }
.encadre.attention { border-left-color: var(--corail); }
.encadre p:first-child { margin-top: 0; } .encadre p:last-child { margin-bottom: 0; }

.tableau { overflow-x: auto; margin: 18px 0; }
table { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--carte); border-radius: 12px; overflow: hidden; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--bord); }
thead th { background: var(--encre); color: #fff; font-family: var(--titre); }
tbody th { background: var(--lilas-clair); }
.oui { color: #9B2C0E; font-weight: 600; }
.non { color: var(--menthe); font-weight: 600; }

.retenir { background: var(--jaune-clair); border-radius: var(--rayon); padding: 6px 22px 14px; margin: 30px 0; }
.retenir h2 { margin-top: .8em; }
.outils { padding-left: 1.2em; }
details { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; font-family: var(--titre); }
details p { margin-bottom: 0; }
code { background: var(--lilas-clair); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.suite { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.suite a { flex: 1 1 240px; }

/* Pied de page */
.pied { margin-top: 60px; border-top: 1px solid var(--bord); padding: 24px 0 40px; color: var(--texte2); font-size: .92rem; }
.pied .enveloppe { display: flex; gap: 10px 24px; flex-wrap: wrap; align-items: center; }
.pied a { color: var(--texte2); }
.pied .marque-pied { margin-right: auto; }

/* Lien d'évitement (visible au clavier seulement) */
.sr { position: absolute; left: -9999px; }
.sr:focus { left: 12px; top: 12px; z-index: 10; background: var(--encre); color: #fff; padding: 8px 14px; border-radius: 8px; }

/* Tableaux sur petit écran : on replie le texte plutôt que de faire défiler */
@media (max-width: 600px) {
  table { min-width: 0; font-size: .86rem; }
  th, td { padding: 8px 7px; hyphens: auto; }
}

/* Sélecteur de langue */
.langue a { display: inline-block; padding: 5px 12px; border: 1px solid var(--bord); border-radius: 999px; color: var(--encre); text-decoration: none; font-weight: 600; font-size: .9rem; background: var(--carte); }
.langue a:hover { background: var(--lilas-clair); }

/* Schéma interactif « qui voit quoi » (CSS seul, sans JavaScript) */
.qvq { margin: 2.2em 0; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 6px 22px 22px; }
.qvq h2 { margin-top: .8em; }
.qvq-intro { color: var(--texte2); margin-top: 0; }
.qvq > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.qvq-choix { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.qvq-choix label { cursor: pointer; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--encre); font-weight: 700; font-family: var(--titre); background: var(--carte); user-select: none; }
.qvq-choix label:hover { background: var(--lilas-clair); }
#qvq-rien:checked ~ .qvq-choix label[for="qvq-rien"],
#qvq-vpn:checked ~ .qvq-choix label[for="qvq-vpn"],
#qvq-tor:checked ~ .qvq-choix label[for="qvq-tor"] { background: var(--encre); color: #fff; }
#qvq-rien:focus-visible ~ .qvq-choix label[for="qvq-rien"],
#qvq-vpn:focus-visible ~ .qvq-choix label[for="qvq-vpn"],
#qvq-tor:focus-visible ~ .qvq-choix label[for="qvq-tor"] { outline: 3px solid var(--menthe); outline-offset: 2px; }
.qvq-p { display: none; }
#qvq-rien:checked ~ .qvq-p-rien, #qvq-vpn:checked ~ .qvq-p-vpn, #qvq-tor:checked ~ .qvq-p-tor { display: block; animation: qvq-apparait .25s ease-out; }
@keyframes qvq-apparait { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qvq-p { animation: none !important; } }
.chaine { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 22px; }
.acteur { position: relative; background: var(--fond); border: 1px solid var(--bord); border-radius: 14px; padding: 12px 12px 10px; }
.acteur:not(:last-child)::after { content: "→"; position: absolute; right: -17px; top: 18px; color: var(--corail); font-weight: 700; }
.acteur h3 { font-size: 1rem; margin: 0 0 8px; }
.acteur h3 small { display: block; font: 400 .8rem var(--corps); color: var(--texte2); }
.acteur dl { margin: 0; }
.acteur dt { font-size: .78rem; color: var(--texte2); margin-top: 6px; }
.acteur dd { margin: 2px 0 0; display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.acteur dd small { font-weight: 400; }
.acteur dd.voit { background: var(--corail-clair); color: #9B2C0E; }
.acteur dd.voit::before { content: "👁 "; }
.acteur dd.cache { background: var(--menthe-clair); color: var(--menthe); }
.acteur dd.cache::before { content: "🔒 "; }
.qvq-bilan { margin: 16px 0 0; padding: 12px 16px; background: var(--jaune-clair); border-radius: 12px; }
@media (max-width: 820px) {
  .chaine { grid-auto-flow: row; gap: 26px; }
  .acteur:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -22px; }
  .acteur dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
  .acteur dt { margin: 0; }
}
/* Dans un article, le schéma déborde de la colonne de lecture pour garder toute la largeur */
.lecture .qvq { width: min(1020px, calc(100vw - 40px)); }
.acteur dd { border-radius: 10px; }
.acteur dd small { display: block; font-size: .75rem; }
@media (max-width: 820px) { .acteur dd { max-width: 13em; } }
