:root{--bg:#F4F2F8;--surface:#fff;--ink:#1F1B2E;--muted:#6A6580;--line:#DDD9E8;--accent:#5B4BDB;color-scheme:light}
@media(prefers-color-scheme:dark){:root{--bg:#17141F;--surface:#221E2E;--ink:#F1EEF8;--muted:#A29CB8;--line:#37314A;--accent:#9A8CFF;color-scheme:dark}}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font:400 1rem/1.6 "DM Sans",system-ui,sans-serif}
h1,h2,.logo{font-family:"Bricolage Grotesque","DM Sans",sans-serif}
a{color:inherit;text-decoration:none}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.annonce{display:flex;align-items:center;justify-content:center;gap:.7rem;flex-wrap:wrap;padding:.55rem clamp(1rem,5vw,4rem);background:var(--accent);color:#fff;font-size:clamp(.8rem,1.8vw,.95rem);font-weight:500;text-align:center}
@media(prefers-color-scheme:dark){.annonce{color:#17141F}}
.top{position:relative;z-index:20;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem clamp(1rem,5vw,4rem);flex-wrap:wrap}
.logo{display:flex;align-items:center;gap:.7rem;font-weight:800;font-size:1.25rem}
.dots{display:grid;grid-template-columns:repeat(3,10px);gap:3px}
.dots i{width:10px;height:10px;border-radius:50%}
nav{display:flex;align-items:center;gap:1.5rem;font-weight:500}
nav a:not(.btn):hover{color:var(--accent)}
.btn{display:inline-block;padding:.6rem 1.2rem;border-radius:10px;background:var(--accent);color:#fff;font-weight:500}
@media(prefers-color-scheme:dark){.btn{color:#17141F}}
.btn.ghost{background:transparent;color:var(--ink);border:1.5px solid var(--line)}
.btn.ghost:hover{border-color:var(--accent)}

/* Pleine largeur : plus aucun max-width */
.hero{padding:clamp(2rem,7vw,5.5rem) clamp(1rem,5vw,4rem) 2rem}
.hero h1{font-size:clamp(2.4rem,7vw,5rem);line-height:1.02;font-weight:800;letter-spacing:-.03em;margin:0 0 1.2rem}
.hero p{color:var(--muted);font-size:1.15rem;margin:0 0 2rem}
.swatches{display:flex;height:14px;margin-bottom:2rem;border-radius:99px;overflow:hidden}
.swatches span{flex:1}
.search input{width:100%;padding:.9rem 1.1rem;font:inherit;color:var(--ink);background:var(--surface);border:1.5px solid var(--line);border-radius:12px}
.apps,.recent{padding:2rem clamp(1rem,5vw,4rem)}
.filters{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1.5rem}
.filters button{font:inherit;padding:.4rem 1rem;border-radius:99px;border:1.5px solid var(--line);background:transparent;color:var(--ink);cursor:pointer}
.filters button[aria-pressed=true]{background:var(--ink);color:var(--bg);border-color:var(--ink)}

/* Mosaïque : même placement sur tous les écrans, tout s'adapte en continu avec clamp() */
.grid{display:grid;grid-template-columns:repeat(6,1fr);grid-auto-rows:clamp(64px,12.5vw,118px);grid-auto-flow:dense;gap:clamp(6px,1.2vw,12px)}
.card{position:relative;display:flex;flex-direction:column;justify-content:space-between;padding:clamp(.6rem,1.8vw,1.3rem);border-radius:clamp(14px,2.5vw,24px);background:var(--c);color:var(--t);overflow:hidden;isolation:isolate;transition:transform .15s}
.card[hidden]{display:none}
.card:hover{transform:scale(1.015)}
.card .ic{width:clamp(20px,3.4vw,32px);height:clamp(20px,3.4vw,32px);flex:none}
.card .wm{position:absolute;z-index:-1;right:-12%;bottom:-14%;width:75%;height:auto;max-height:130%;opacity:.16}
.txt{display:flex;flex-direction:column;gap:.2rem}
.txt strong{font:800 clamp(.8rem,1.9vw,1.15rem)/1.15 "Bricolage Grotesque","DM Sans",sans-serif}
.txt span{font-size:clamp(.62rem,1.4vw,.88rem);line-height:1.3;opacity:.88}
/* ligne-début / colonne-début / ligne-fin / colonne-fin */
.t-audio{grid-area:1/1/4/4}
.t-video{grid-area:1/4/3/7}
.t-vecteur{grid-area:3/4/6/5}
.t-3d{grid-area:3/5/6/7}
.t-image{grid-area:4/1/6/3}
.t-palette{grid-area:4/3/6/4}
.t-audio .ic{width:clamp(32px,6vw,56px);height:clamp(32px,6vw,56px)}
.t-audio .txt strong{font-size:clamp(1.3rem,4vw,2.3rem)}
.t-audio .txt span{font-size:clamp(.7rem,1.8vw,1.05rem);max-width:22rem}
.t-3d .txt strong,.t-image .txt strong{font-size:clamp(1rem,2.6vw,1.5rem)}
/* Pendant une recherche ou un filtre : placement libre */
.grid.filtering .card{grid-area:auto;grid-column:span 2;grid-row:span 2}
/* Petits téléphones : descriptions masquées sauf sur la grande carte */
@media(max-width:450px){.card:not(.t-audio) .txt span{display:none}}

/* ===== Modes d'affichage (sélecteur) ===== */
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1.5rem}
.toolbar .filters{margin-bottom:0}
.views{display:flex;gap:2px;padding:3px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface)}
.views button{display:flex;align-items:center;justify-content:center;font:inherit;padding:.5rem .7rem;border:0;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer}
.views button:hover{color:var(--ink)}
.views button svg{width:18px;height:18px;flex:none}
.views button[aria-pressed=true],.views button[aria-pressed=true]:hover{background:var(--ink);color:var(--bg)}
.tag{display:none;font-size:.75rem;line-height:1.4;padding:.15rem .65rem;border:1px solid var(--line);border-radius:99px;color:var(--muted);white-space:nowrap}

/* Communs aux modes Grille / Liste */
#grid:not([data-view=mosaic]){grid-auto-rows:auto;grid-auto-flow:row}
#grid:not([data-view=mosaic]) .card{grid-area:auto;grid-column:auto;grid-row:auto;padding:1.2rem;border-radius:18px}
#grid:not([data-view=mosaic]) .card .ic{width:36px;height:36px}
#grid:not([data-view=mosaic]) .txt strong{font-size:1.1rem}
#grid:not([data-view=mosaic]) .txt span{display:block;font-size:.85rem;max-width:none}

/* Grille simple : cartes colorées de taille égale */
#grid[data-view=grid]{grid-template-columns:repeat(auto-fill,minmax(clamp(150px,22vw,240px),1fr));grid-auto-rows:minmax(170px,auto);gap:12px}

/* Liste */
#grid[data-view=list]{grid-template-columns:1fr;gap:10px}
#grid[data-view=list] .card{flex-direction:row;align-items:center;justify-content:flex-start;gap:1rem;padding:.9rem 1.1rem;border-radius:16px}
#grid[data-view=list] .txt{flex:1;min-width:0}
#grid[data-view=list] .tag{display:inline-block;margin-left:auto}
@media(max-width:600px){#grid[data-view=list] .tag{display:none}}

/* Liste : cartes claires, pastille d'icône colorée */
#grid[data-view=list] .card{background:var(--surface);color:var(--ink);border:1.5px solid var(--line)}
#grid[data-view=list] .card:hover{border-color:var(--c);transform:none}
#grid[data-view=list] .wm{display:none}
#grid[data-view=list] .card .ic{width:46px;height:46px;padding:11px;border-radius:13px;background:var(--c);color:var(--t)}

/* Slider horizontal « Communauté & ressources » : cartes de même taille, une seule ligne */
.slider{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-left:6px;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none;padding:6px 6px 10px;margin:-6px}
.slider::-webkit-scrollbar{display:none}
#slider .card{flex:1 0 max(220px,calc((100% - 36px)/4));height:clamp(160px,16vw,190px);padding:1.2rem;border-radius:22px;scroll-snap-align:start}
#slider .card .ic{width:32px;height:32px}
/* Fonds WebP des cartes (dossier assets/img/) */
#slider .card{background-size:cover;background-position:right center;background-repeat:no-repeat}
#slider .wm{display:none}
#slider .txt strong{font-size:1.15rem}
#slider .txt span{display:block;font-size:.88rem}
.bonus h2{margin:0 0 1rem;font-size:clamp(1.2rem,2.6vw,1.6rem);font-weight:800}
/* Page en construction */
.construct{min-height:55vh}
.construct .badge{display:grid;place-items:center;width:clamp(72px,12vw,120px);aspect-ratio:1;margin-bottom:1.5rem;border-radius:28%;background:var(--accent);color:#fff}
@media(prefers-color-scheme:dark){.construct .badge{color:#17141F}}
.construct .badge svg{width:55%;height:55%}
.actions{display:flex;gap:.8rem;flex-wrap:wrap}
/* Menu déroulant « Applications » */
.menu-btn{display:flex;align-items:center;gap:.3rem;padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:500;cursor:pointer}
.menu-btn:hover,.menu-btn[aria-expanded=true]{color:var(--accent)}
.menu-btn svg{width:16px;height:16px;transition:transform .15s}
.menu-btn[aria-expanded=true] svg{transform:rotate(180deg)}
.menu-wrap{position:relative}
.menu-panel{position:absolute;top:calc(100% + .7rem);left:0;z-index:30;width:min(28rem,calc(100vw - 2rem));max-height:75vh;overflow:auto;padding:.5rem;background:var(--surface);border:1.5px solid var(--line);border-radius:18px;box-shadow:0 18px 40px rgba(31,27,46,.18)}
.menu-panel[hidden]{display:none}
@media(max-width:700px){.menu-wrap{position:static}.menu-panel{top:100%;left:clamp(1rem,5vw,4rem);right:clamp(1rem,5vw,4rem);width:auto}}
@media(prefers-color-scheme:dark){.menu-panel{box-shadow:0 18px 40px rgba(0,0,0,.5)}}
.menu-panel ul{list-style:none;margin:0;padding:0}
.menu-panel li a,.menu-panel .all{display:flex;align-items:center;gap:.9rem;padding:.6rem .7rem;border-radius:12px}
.menu-panel li a:hover,.menu-panel .all:hover{background:var(--bg)}
.menu-panel .chip{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:var(--c);color:var(--t)}
.menu-panel .chip svg{width:22px;height:22px}
.menu-panel .mt{display:flex;flex-direction:column;min-width:0}
.menu-panel .mt strong{font:800 1rem/1.2 "Bricolage Grotesque","DM Sans",sans-serif}
.menu-panel .mt small{color:var(--muted);font-size:.82rem;line-height:1.3}
#vide{color:var(--muted)}
.recent{display:flex;flex-wrap:wrap;gap:1.2rem;align-items:stretch}
.recent>.box{flex:1 1 280px;min-width:0}
.recent>.box:first-child{flex:2 1 380px}
.head{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
.head h2{margin:0}
.space{margin:0 0 1rem;color:var(--muted)}
.box{background:var(--surface);border:1.5px solid var(--line);border-radius:14px;padding:1.5rem}
.box h2{margin:0 0 1rem;font-size:1.2rem}
.box ul{list-style:none;margin:0;padding:0}
.box li{display:flex;align-items:center;gap:.8rem;padding:.7rem 0;border-top:1px solid var(--line)}
.box li b{width:12px;height:12px;border-radius:3px}
.box small{margin-left:auto;color:var(--muted)}
.note{font-size:.85rem;color:var(--muted)}
/* Mes fichiers : détail par type, zone défilante (la boîte garde la hauteur de « Projets récents ») */
#fichiers{display:flex;flex-direction:column}
#fichiers .btn{align-self:flex-start;margin-top:.8rem}
.ftypes-wrap{position:relative;flex:1 1 auto;min-height:4rem}
.ftypes{position:absolute;inset:0;overflow-y:auto;overscroll-behavior:contain;padding-right:.5rem;scrollbar-width:thin}
.ft{padding-bottom:.6rem}
.ft-h{display:flex;justify-content:space-between;align-items:baseline;gap:.8rem;font-size:.88rem;line-height:1.4;margin-bottom:.25rem}
.ft-h small{margin-left:0;font-size:.82rem}
.meter.sm{height:8px;margin-bottom:0}
@media(max-width:760px){.ftypes-wrap{min-height:9.5rem}}
.meter{height:12px;background:var(--line);border-radius:99px;overflow:hidden;margin-bottom:.8rem}
.meter span{display:block;height:100%;background:var(--accent)}
footer{padding:2rem clamp(1rem,5vw,4rem);color:var(--muted);font-size:.9rem}
footer a:hover{color:var(--accent)}
@media(max-width:760px){.box li{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Pages légales + centre d'aide : mêmes variables, polices et composants que l'index (assets/style.css) */

/* ===== En-tête de page ===== */
.legal-hero{padding-bottom:1rem}
.legal-hero h1{font-size:clamp(2rem,5.5vw,3.8rem);margin-bottom:1rem}
.legal-hero p{max-width:60ch;margin-bottom:1.5rem}
.legal-hero .swatches{margin-bottom:1.2rem}
.update-badge{display:inline-block;font-size:.8rem;line-height:1.4;padding:.2rem .8rem;border:1px solid var(--line);border-radius:99px;background:var(--surface);color:var(--muted)}

/* ===== Mise en page : sommaire + sections ===== */
.legal-layout{display:grid;grid-template-columns:minmax(210px,260px) minmax(0,1fr);gap:1.5rem;align-items:start;padding:1rem clamp(1rem,5vw,4rem) 3rem}
.legal-nav{position:sticky;top:1.2rem;max-height:calc(100vh - 2.4rem);overflow:auto;padding:1.2rem;background:var(--surface);border:1.5px solid var(--line);border-radius:14px}
.legal-nav-title{margin:0 0 .8rem;font:800 1.2rem/1.2 "Bricolage Grotesque","DM Sans",sans-serif}
.legal-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.legal-nav a{display:block;padding:.4rem .7rem;border-radius:10px;color:var(--muted);font-size:.92rem;line-height:1.35}
.legal-nav a:hover{background:var(--bg);color:var(--ink)}
.legal-nav a.active{background:var(--ink);color:var(--bg);font-weight:500}

.legal-body{display:flex;flex-direction:column;gap:1.2rem;min-width:0}

/* Couleurs d'accent : celles des applications, en alternance */
.legal-body>.legal-section:nth-child(6n+1),.help-categories>:nth-child(6n+1),.help-content>.help-section:nth-child(6n+1){--c:#E8466E;--t:#fff}
.legal-body>.legal-section:nth-child(6n+2),.help-categories>:nth-child(6n+2),.help-content>.help-section:nth-child(6n+2){--c:#E88A1A;--t:#1F1B2E}
.legal-body>.legal-section:nth-child(6n+3),.help-categories>:nth-child(6n+3),.help-content>.help-section:nth-child(6n+3){--c:#139C87;--t:#fff}
.legal-body>.legal-section:nth-child(6n+4),.help-categories>:nth-child(6n+4),.help-content>.help-section:nth-child(6n+4){--c:#3F78E0;--t:#fff}
.legal-body>.legal-section:nth-child(6n+5),.help-categories>:nth-child(6n+5),.help-content>.help-section:nth-child(6n+5){--c:#A24BD6;--t:#fff}
.legal-body>.legal-section:nth-child(6n+6),.help-categories>:nth-child(6n+6),.help-content>.help-section:nth-child(6n+6){--c:#6FA312;--t:#fff}

.legal-section{--c:#5B4BDB;--t:#fff;display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:1rem;padding:1.5rem;background:var(--surface);border:1.5px solid var(--line);border-radius:14px;scroll-margin-top:1.2rem}
.legal-section>*{grid-column:2;min-width:0}
.legal-section-label{grid-column:1;grid-row:1;align-self:start;display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:var(--c);color:var(--t);font:800 1rem/1 "Bricolage Grotesque","DM Sans",sans-serif}
.legal-section>h2{grid-row:1;display:flex;align-items:center;min-height:44px;margin:0 0 .8rem;font-size:clamp(1.2rem,2.4vw,1.5rem);font-weight:800;line-height:1.2}
.legal-section p{margin:0 0 .9rem;max-width:75ch;line-height:1.7}
.legal-section>*:last-child{margin-bottom:0}
.legal-section strong{font-weight:500}
.legal-section a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.legal-section a:hover{text-decoration-thickness:2px}
.legal-divider{display:none}

.legal-list{list-style:none;margin:0 0 .9rem;padding:0}
.legal-list li{position:relative;max-width:75ch;padding:.2rem 0 .2rem 1.5rem;line-height:1.7}
.legal-list li::before{content:"";position:absolute;left:.15rem;top:.9em;width:8px;height:8px;border-radius:3px;background:var(--c)}

.info-block{margin:.4rem 0 .9rem;padding:1rem 1.2rem;background:var(--bg);border:1.5px solid var(--line);border-left:5px solid var(--c);border-radius:12px}
.info-block strong{display:block;margin-bottom:.4rem;font:800 1rem/1.3 "Bricolage Grotesque","DM Sans",sans-serif}
.info-block p{margin:0 0 .3rem}

.legal-table-wrap{overflow-x:auto;margin:.4rem 0 .9rem;border:1.5px solid var(--line);border-radius:12px}
.legal-table{width:100%;min-width:34rem;border-collapse:collapse;font-size:.92rem;line-height:1.5}
.legal-table th,.legal-table td{padding:.7rem .9rem;text-align:left;vertical-align:top;border-top:1px solid var(--line)}
.legal-table thead th{border-top:0;background:var(--bg);color:var(--muted);font-weight:500}

@media(max-width:900px){
  .legal-layout{grid-template-columns:1fr}
  .legal-nav{position:static;max-height:none;padding:.8rem}
  .legal-nav-title{display:none}
  .legal-nav ul{flex-direction:row;gap:.5rem;overflow-x:auto;padding-bottom:.2rem;scrollbar-width:thin}
  .legal-nav a{white-space:nowrap;padding:.3rem 1rem;border:1.5px solid var(--line);border-radius:99px}
}
@media(max-width:600px){
  .legal-section{grid-template-columns:1fr;padding:1.2rem}
  .legal-section>*{grid-column:1}
  .legal-section-label{grid-row:auto;width:38px;height:38px;margin-bottom:.6rem}
  .legal-section>h2{grid-row:auto;min-height:0}
}

/* ===== Boutons (même look que .btn de l'index) ===== */
.btn-accent{display:inline-flex;align-items:center;gap:.5rem;padding:.6rem 1.2rem;border:0;border-radius:10px;background:var(--accent);color:#fff;font:500 1rem/1.4 "DM Sans",system-ui,sans-serif;cursor:pointer}
.btn-accent:hover{filter:brightness(1.08)}
.btn-accent:disabled{opacity:.6;cursor:default}
@media(prefers-color-scheme:dark){.btn-accent{color:#17141F}}

/* ===== Centre d'aide ===== */
.help-hero .search{display:block;max-width:44rem}

.help-categories{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;padding:1rem clamp(1rem,5vw,4rem) 0}
.help-cat-card{--c:#5B4BDB;--t:#fff;display:flex;flex-direction:column;justify-content:space-between;gap:1.4rem;min-height:112px;padding:1.1rem;border-radius:18px;background:var(--c);color:var(--t);transition:transform .15s}
.help-cat-card:hover{transform:scale(1.015)}
.help-cat-icon{display:block;width:32px;height:32px}
.help-cat-icon svg{width:32px;height:32px}
.help-cat-name{font:800 1rem/1.15 "Bricolage Grotesque","DM Sans",sans-serif}

.help-content{display:grid;grid-template-columns:1fr;gap:1.2rem;padding:2rem clamp(1rem,5vw,4rem) 1rem}
@media(min-width:1025px){.help-content{grid-template-columns:1fr 1fr;align-items:start}}
.help-no-results{display:none;grid-column:1/-1;margin:0;padding:2rem 0;color:var(--muted);text-align:center}
.help-no-results.is-visible{display:block}

.help-section{--c:#5B4BDB;--t:#fff;padding:1.5rem;background:var(--surface);border:1.5px solid var(--line);border-radius:14px;scroll-margin-top:1.2rem}
.help-section-head{display:flex;align-items:center;gap:.9rem;margin-bottom:1.1rem}
.help-section-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:var(--c);color:var(--t)}
.help-section-title{margin:0;font-size:1.2rem;font-weight:800;line-height:1.2}

.help-accordion{display:flex;flex-direction:column;gap:.6rem}
.help-item{overflow:hidden;background:var(--bg);border:1.5px solid var(--line);border-radius:12px;transition:border-color .15s}
.help-item.is-open{border-color:var(--c)}
.help-item[data-hidden="true"]{display:none}
.help-item-q{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;padding:.9rem 1.1rem;border:0;background:none;color:var(--ink);font:500 .95rem/1.4 "DM Sans",system-ui,sans-serif;text-align:left;cursor:pointer}
.help-item-q .plus{display:grid;place-items:center;flex:none;width:22px;height:22px;color:var(--accent);transition:transform .2s}
.help-item.is-open .plus{transform:rotate(45deg)}
.help-item-a{max-height:0;overflow:hidden;transition:max-height .25s ease}
.help-item-a-inner{padding:0 1.1rem 1.1rem;color:var(--muted);font-size:.92rem;line-height:1.7}
.help-item-a-inner a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.help-item-a-inner ul{margin:.6rem 0 .2rem 1.1rem}

/* Formulaire de demande */
.help-request-toggle{margin-top:.8rem;white-space:normal;text-align:center}
.help-request-toggle svg{flex:none;transition:transform .2s}
.help-request-toggle.is-open svg{transform:rotate(45deg)}
.help-request-form{max-height:0;overflow:hidden;transition:max-height .3s ease}
.help-request-form-inner{margin-top:.9rem;padding:1.2rem;background:var(--bg);border:1.5px solid var(--line);border-radius:14px}
.help-request-row{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin-bottom:.8rem}
@media(max-width:520px){.help-request-row{grid-template-columns:1fr}}
.help-request-field{display:flex;flex-direction:column;gap:.35rem}
.help-request-field label{color:var(--muted);font-size:.82rem;font-weight:500}
.help-request-field input,.help-request-field select,.help-request-field textarea{padding:.65rem .85rem;border:1.5px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit;font-size:.92rem;resize:vertical}
.help-request-field select{cursor:pointer}
.help-request-as{margin:0 0 .9rem;color:var(--muted);font-size:.85rem}
.help-request-as strong{color:var(--ink);font-weight:500}
.help-request-submit{display:inline-flex;align-items:center;gap:.5rem}
.help-request-feedback{display:none;margin:.8rem 0 0;font-size:.88rem;font-weight:500}
.help-request-feedback.is-success{display:block;color:#1E7D34}
.help-request-feedback.is-error{display:block;color:#C0392B}
@media(prefers-color-scheme:dark){
  .help-request-feedback.is-success{color:#5CD184}
  .help-request-feedback.is-error{color:#FF8A7A}
}

.help-cta{padding:1rem clamp(1rem,5vw,4rem) 3rem}
.help-cta-box{padding:2rem;background:var(--surface);border:1.5px solid var(--line);border-radius:14px;text-align:center}
.help-cta-box h3{margin:0 0 .4rem;font:800 1.4rem/1.2 "Bricolage Grotesque","DM Sans",sans-serif}
.help-cta-box p{margin:0 0 1.2rem;color:var(--muted)}

/* Lien « Retour à l'accueil » (pages légales et centre d'aide) */
.legal-back{display:inline-flex;align-items:center;gap:.5rem;margin-bottom:1.5rem}
.legal-back svg{width:16px;height:16px;flex:none}

/* =====================================================================
   Pages Abonnement et Contact : mêmes variables, polices et composants que l'index
   ===================================================================== */

/* En-tête commun : le menu passe à la ligne sur petit écran */
.top nav{flex-wrap:wrap;gap:.6rem 1.5rem}
nav a[aria-current=page]{color:var(--accent)}

/* Messages de retour (formulaires) */
.sub-msg{display:none;margin:0 0 1rem;padding:.7rem 1rem;border:1.5px solid;border-radius:10px;font-size:.92rem;font-weight:500}
.sub-msg.error{display:block;color:#C0392B;border-color:#C0392B;background:rgba(192,57,43,.08)}
.sub-msg.success{display:block;color:#1E7D34;border-color:#1E7D34;background:rgba(30,125,52,.08)}
@media(prefers-color-scheme:dark){
  .sub-msg.error{color:#FF8A7A;border-color:#FF8A7A;background:rgba(255,138,122,.1)}
  .sub-msg.success{color:#5CD184;border-color:#5CD184;background:rgba(92,209,132,.1)}
}

/* ===== Abonnement ===== */
.sub-layout{display:grid;gap:1.2rem;align-items:start;padding:1rem clamp(1rem,5vw,4rem) 3rem}
.sub-side{display:flex;flex-direction:column;gap:1rem;min-width:0}
@media(min-width:900px){
  .sub-layout{grid-template-columns:minmax(280px,380px) minmax(0,1fr)}
  .sub-side{position:sticky;top:1.2rem}
}

/* Mensuel / Annuel : même sélecteur que les modes d'affichage de l'index */
.billing-toggle{display:flex;gap:2px;padding:3px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface)}
.billing-toggle-btn{flex:1;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.2rem .5rem;padding:.6rem .8rem;border:0;border-radius:9px;background:transparent;color:var(--muted);font:500 .95rem/1.3 "DM Sans",system-ui,sans-serif;cursor:pointer}
.billing-toggle-btn:hover{color:var(--ink)}
.billing-toggle-btn.is-active,.billing-toggle-btn.is-active:hover{background:var(--ink);color:var(--bg)}
.save-chip{padding:.05rem .6rem;border-radius:99px;background:var(--accent);color:#fff;font-size:.75rem;font-weight:500;line-height:1.5}
@media(prefers-color-scheme:dark){.save-chip{color:#17141F}}

/* Carte de la formule : bandeau des couleurs des applications */
.sub-plan{overflow:hidden;background:var(--surface);border:1.5px solid var(--line);border-radius:14px}
.sub-plan .swatches{height:10px;margin:0;border-radius:0}
.sub-plan-body{padding:1.5rem}
.sub-plan h2{margin:0 0 .9rem;font-size:1.2rem}
.formule-price-old{display:block;color:var(--muted);text-decoration:line-through}
.formule-price strong{display:block;font:800 clamp(2rem,4vw,2.6rem)/1.1 "Bricolage Grotesque","DM Sans",sans-serif;letter-spacing:-.02em}
.formule-period{margin:.4rem 0 1.2rem;color:var(--muted);font-size:.92rem}
.sub-features{list-style:none;margin:0;padding:0}
.sub-features li{position:relative;padding:.35rem 0 .35rem 1.5rem;line-height:1.5}
.sub-features li::before{content:"";position:absolute;left:.15rem;top:.95em;width:8px;height:8px;border-radius:3px;background:var(--c)}
.sub-features li:nth-child(1){--c:#E8466E}
.sub-features li:nth-child(2){--c:#E88A1A}
.sub-features li:nth-child(3){--c:#139C87}
.sub-features li:nth-child(4){--c:#3F78E0}
.sub-features li:nth-child(5){--c:#A24BD6}

/* Carte compte + paiement */
.sub-card{min-width:0;padding:clamp(1.2rem,3vw,2rem);background:var(--surface);border:1.5px solid var(--line);border-radius:14px}
.sub-step{display:flex;align-items:center;gap:.9rem;margin-bottom:.5rem}
.sub-step-n{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:13px;background:var(--c);color:var(--t);font:800 1rem/1 "Bricolage Grotesque","DM Sans",sans-serif}
.sub-step-n svg{width:22px;height:22px}
.sub-step h2{margin:0;font-size:clamp(1.2rem,2.4vw,1.5rem);line-height:1.2}
.sub-hint{margin:0 0 1.2rem;color:var(--muted);font-size:.92rem}
.sub-sep{margin:1.8rem 0;border:0;border-top:1px solid var(--line)}

.sub-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:1rem 1.2rem;align-items:start;margin-bottom:1rem}
.sub-field label{display:block;margin-bottom:.35rem;color:var(--muted);font-size:.85rem;font-weight:500}
.sub-field input{width:100%;padding:.7rem .9rem;border:1.5px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);font:inherit;appearance:none}
.sub-field input:focus{border-color:var(--accent)}
.password-field{position:relative}
.password-field input{padding-right:2.9rem}
.pw-toggle{position:absolute;top:50%;right:6px;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer}
.pw-toggle:hover{color:var(--accent)}
.pw-toggle svg{width:18px;height:18px;pointer-events:none}
.pw-toggle .icon-eye{display:none}
.pw-toggle.is-visible .icon-eye{display:block}
.pw-toggle.is-visible .icon-eye-off{display:none}
.strength-bar{height:6px;margin-top:.5rem;border-radius:99px;background:var(--line);overflow:hidden}
.strength-fill{width:0;height:100%;border-radius:99px;transition:width .3s,background .3s}
.strength-label{min-height:1.4em;margin-top:.3rem;color:var(--muted);font-size:.82rem}
.strength-label.ok{color:#1E7D34}
.strength-label.ko{color:#C0392B}
@media(prefers-color-scheme:dark){.strength-label.ok{color:#5CD184}.strength-label.ko{color:#FF8A7A}}

#dropin-container{min-height:60px;margin-bottom:1.2rem;padding:1rem;background:#fff;border:1.5px solid var(--line);border-radius:12px}
#dropin-loading{margin:0;color:#6A6580;font-size:.92rem}

.sub-check{display:flex;align-items:flex-start;gap:.7rem;margin-top:.9rem;font-size:.88rem;line-height:1.5;cursor:pointer}
.sub-check input{flex:none;width:18px;height:18px;margin:.15rem 0 0;accent-color:var(--accent);cursor:pointer}
.sub-check a,.sub-legal a,.sub-login-hint a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.sub-check.has-error{outline:2px solid #C0392B;outline-offset:4px;border-radius:6px}
.btn-accent.sub-submit-btn{width:100%;justify-content:center;margin-top:1.2rem;padding:.9rem 1rem}
.sub-legal{margin:1rem 0 0;color:var(--muted);font-size:.8rem;line-height:1.6}
.sub-login-hint{margin:1.2rem 0 0;color:var(--muted);font-size:.92rem}
.sub-login-hint+.sub-login-hint{margin-top:.4rem}
.sub-active{margin:0 clamp(1rem,5vw,4rem) 3rem;max-width:40rem;line-height:1.7}
.sub-active .btn{margin-top:.8rem}

/* ===== Contact ===== */
.ct-methods{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px;padding:1rem clamp(1rem,5vw,4rem)}
.ct-card{position:relative;display:flex;flex-direction:column;gap:1.4rem;min-height:230px;padding:1.4rem;border-radius:22px;background:var(--c);color:var(--t);overflow:hidden;isolation:isolate}
.ct-card .wm{position:absolute;z-index:-1;right:-12%;bottom:-14%;width:70%;height:auto;opacity:.16}
.ct-card .ic{width:36px;height:36px;flex:none}
.ct-txt{flex:1}
.ct-txt strong{display:block;font:800 1.4rem/1.15 "Bricolage Grotesque","DM Sans",sans-serif}
.ct-txt p{margin:.4rem 0 0;font-size:.92rem;line-height:1.45;opacity:.92}
.ct-action{align-self:flex-start;display:inline-block;padding:.55rem 1.1rem;border-radius:10px;background:rgba(0,0,0,.24);color:var(--t);font-weight:500}
.ct-action:hover{background:rgba(0,0,0,.36)}
.ct-note{font-size:.88rem;opacity:.9}
.ct-card.is-disabled{filter:grayscale(1);opacity:.55;user-select:none}
.ct-card.is-disabled .ct-action{pointer-events:none;cursor:not-allowed}

.ct-content{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,28rem),1fr));gap:1.2rem;align-items:start;padding:1rem clamp(1rem,5vw,4rem)}
.ct-content .help-section{min-width:0}
.ct-desc{margin:0 0 1.1rem;color:var(--muted);font-size:.92rem}
.help-request-form.is-static{max-height:none;overflow:visible}
.help-request-form.is-static .help-request-form-inner{margin-top:0}
.help-section-icon svg{width:22px;height:22px}

/* =====================================================================
   Forum : accueil, catégorie, sujet, nouveau sujet
   ===================================================================== */
.fo-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem .6rem;padding:1rem clamp(1rem,5vw,4rem) 0;color:var(--muted);font-size:.9rem}
.fo-crumbs a:hover{color:var(--accent)}
.fo-crumbs .sep{opacity:.5}
.fo-crumbs .current{max-width:30rem;overflow:hidden;color:var(--ink);font-weight:500;text-overflow:ellipsis;white-space:nowrap}

.fo-hero{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1.5rem 3rem;padding:clamp(1.5rem,5vw,3.5rem) clamp(1rem,5vw,4rem) 1.2rem}
.fo-hero h1{margin:0 0 .8rem;font-size:clamp(2.2rem,6vw,4rem);font-weight:800;line-height:1.02;letter-spacing:-.03em}
.fo-hero p{max-width:40rem;margin:0;color:var(--muted);font-size:1.1rem}
.fo-stats{display:flex;gap:2.2rem;margin:0}
.fo-stats div{display:flex;flex-direction:column-reverse}
.fo-stats dt{color:var(--muted);font-size:.9rem}
.fo-stats dd{margin:0;font:800 clamp(1.8rem,4vw,2.6rem)/1 "Bricolage Grotesque","DM Sans",sans-serif}
.fo-bar{padding:0 clamp(1rem,5vw,4rem)}
.fo-bar .swatches{margin:0}

.fo-tiles{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;margin:1.5rem clamp(1rem,5vw,4rem) 0}
.fo-tiles::-webkit-scrollbar{display:none}
.fo-tile{position:relative;display:flex;flex:0 0 clamp(170px,22vw,230px);align-items:flex-end;height:clamp(120px,14vw,150px);padding:1rem;overflow:hidden;isolation:isolate;scroll-snap-align:start;border-radius:18px;background:#2A2536 center/cover no-repeat;color:#fff;font:800 1.05rem/1.15 "Bricolage Grotesque","DM Sans",sans-serif}
.fo-tile::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,rgba(23,20,31,.82),rgba(23,20,31,.12) 70%);transition:opacity .15s}
.fo-tile:hover::before{opacity:.8}
.fo-dot{position:absolute;top:.8rem;left:.8rem;width:14px;height:14px;border-radius:50%;background:var(--c);box-shadow:0 0 0 2px #fff}

.fo-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:1.5rem clamp(1rem,5vw,4rem) 0}
.fo-toolbar--start{justify-content:flex-start}
.toolbar-filters{display:flex;flex-wrap:wrap;gap:.5rem}
.filter-btn{display:inline-block;padding:.4rem 1rem;border:1.5px solid var(--line);border-radius:99px;color:var(--ink)}
.filter-btn:hover{border-color:var(--accent)}
.filter-btn.active{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.btn-new-post{display:inline-flex;align-items:center;gap:.5rem;padding:.6rem 1.2rem;border:0;border-radius:10px;background:var(--accent);color:#fff;font:500 1rem/1.4 "DM Sans",system-ui,sans-serif;cursor:pointer;white-space:nowrap}
.btn-new-post:hover{filter:brightness(1.08)}
.btn-new-post:disabled{opacity:.6;cursor:default}
@media(prefers-color-scheme:dark){.btn-new-post{color:#17141F}}

.forum-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:1.5rem;align-items:start;padding:1.5rem clamp(1rem,5vw,4rem) 3rem}
.forum-main{min-width:0}
.forum-sidebar{display:flex;flex-direction:column;gap:1rem;min-width:0}
@media(max-width:960px){.forum-layout{grid-template-columns:1fr}}

/* Panneaux */
.sidebar-card,.post-list,.subcategory-list,.topic-card,.reply-card,.reply-form-card,.np-card{background:var(--surface);border:1.5px solid var(--line);border-radius:14px}
.sidebar-card,.post-list,.subcategory-list{overflow:hidden}
.sidebar-card-head{padding:.9rem 1.1rem 0}
.sidebar-card-head h3{margin:0;font:800 1.05rem/1.2 "Bricolage Grotesque","DM Sans",sans-serif}
.sidebar-card-body{padding:.6rem 1.1rem 1rem}
.info-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.5rem 0;border-top:1px solid var(--line);font-size:.92rem}
.info-row:first-child{border-top:0}
.info-label{color:var(--muted)}
.info-value{font-weight:500;text-align:right}
.info-value a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.side-link{display:block;padding:.6rem 0;border-top:1px solid var(--line)}
.side-link:first-child{border-top:0}
.side-link:hover .side-link-title{color:var(--accent)}
.side-link-title{margin-bottom:.15rem;font-size:.92rem;line-height:1.35}
.side-link-meta,.side-empty{color:var(--muted);font-size:.82rem}
.rules-list{display:flex;flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none}
.rules-list li{position:relative;padding-left:1.1rem;color:var(--muted);font-size:.9rem;line-height:1.45}
.rules-list li::before{content:"";position:absolute;left:0;top:.55em;width:7px;height:7px;border-radius:2px;background:var(--accent)}

/* Catégories (accueil) */
.category-block{margin-top:1.8rem}
.category-block:first-child{margin-top:0}
.category-header{display:flex;align-items:center;gap:.8rem;margin-bottom:.7rem}
.category-header::before{content:"";flex:none;width:14px;height:14px;border-radius:4px;background:var(--c)}
.category-name{font:800 1.3rem/1.2 "Bricolage Grotesque","DM Sans",sans-serif}
.category-count{margin-left:auto;color:var(--muted);font-size:.9rem}
.subcategory-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,11rem);gap:0 1.2rem;align-items:center;padding:.9rem 1.1rem;border-top:1px solid var(--line)}
.subcategory-row:first-child{border-top:0}
.subcategory-row:hover{background:var(--bg)}
.subcat-name{font-weight:500}
.subcat-desc{color:var(--muted);font-size:.88rem}
.subcat-stats{min-width:56px;text-align:right}
.subcat-stat-num{font:800 1.15rem/1 "Bricolage Grotesque","DM Sans",sans-serif}
.subcat-stat-label,.subcat-last-meta{color:var(--muted);font-size:.78rem}
.subcat-last{text-align:right;min-width:0}
.subcat-last-title{overflow:hidden;font-size:.88rem;text-overflow:ellipsis;white-space:nowrap}
.subcat-last-meta span{color:var(--ink)}
@media(max-width:700px){.subcategory-row{grid-template-columns:minmax(0,1fr) auto}.subcat-last{display:none}}

/* Liste des sujets */
.section-label-line{margin:2rem 0 .8rem}
.section-label-line:first-child{margin-top:0}
.section-label-line h2{margin:0;font-size:clamp(1.2rem,2.6vw,1.6rem);font-weight:800}
.post-row{display:grid;grid-template-columns:44px minmax(0,1fr) 70px 70px 150px;gap:0 1rem;align-items:center;padding:.9rem 1.1rem;border-top:1px solid var(--line)}
.post-row:first-child{border-top:0}
a.post-row:hover{background:var(--bg)}
a.post-row:hover .post-title{color:var(--accent)}
.post-row.post-head{padding:.6rem 1.1rem;background:var(--bg);color:var(--muted);font-size:.82rem;pointer-events:none}
.post-head>div:nth-child(3),.post-head>div:nth-child(4){text-align:center}
.post-head>div:nth-child(5){text-align:right}
.post-row.pinned{box-shadow:inset 4px 0 0 var(--accent)}
.pin-icon{color:var(--accent);font-size:.8rem;font-weight:500}
.post-title{margin-bottom:.2rem;font-weight:500;line-height:1.35}
.post-tags,.topic-tags{display:flex;flex-wrap:wrap;gap:.4rem}
.topic-tags{margin-bottom:.7rem}
.post-replies,.post-views{text-align:center}
.post-stat-num{font:800 1.1rem/1 "Bricolage Grotesque","DM Sans",sans-serif}
.post-stat-label,.post-last-time,.post-last-cat{color:var(--muted);font-size:.78rem}
.post-last{min-width:0;text-align:right}
.post-last-author{overflow:hidden;font-size:.88rem;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.no-replies{padding:2.2rem 1rem;color:var(--muted);text-align:center}
@media(max-width:900px){
  .post-row{grid-template-columns:40px minmax(0,1fr) 60px}
  .post-replies,.post-last,.post-head>div:nth-child(3),.post-head>div:nth-child(5){display:none}
}

/* Avatars (couleur de la palette selon l'auteur) */
.post-avatar,.thread-avatar,.contrib-avatar{display:grid;place-items:center;flex:none;border-radius:50%;background:var(--c,var(--accent));color:var(--t,#fff);font:800 1rem/1 "Bricolage Grotesque","DM Sans",sans-serif}
.post-avatar{width:40px;height:40px}
.thread-avatar{width:44px;height:44px}
.contrib-avatar{width:32px;height:32px;font-size:.85rem}

/* Tags de sujet */
.ftag{padding:.05rem .65rem;border:1px solid var(--line);border-radius:99px;color:var(--muted);font-size:.78rem;line-height:1.5}
.ftag.tag-hot{border-color:#C2561A;color:#C2561A}
.ftag.tag-new{border-color:#1E7D34;color:#1E7D34}
@media(prefers-color-scheme:dark){.ftag.tag-hot{border-color:#FF9A5C;color:#FF9A5C}.ftag.tag-new{border-color:#5CD184;color:#5CD184}}

/* Barre latérale : classement, tags, partages */
.contrib-row{display:flex;align-items:center;gap:.8rem;padding:.55rem 0;border-top:1px solid var(--line)}
.contrib-row:first-child{border-top:0}
.contrib-rank{width:20px;flex:none;color:var(--muted);font:800 1rem/1 "Bricolage Grotesque","DM Sans",sans-serif;text-align:center}
.contrib-rank.gold{color:#E88A1A}
.contrib-rank.silver{color:var(--muted)}
.contrib-rank.bronze{color:#C2561A}
.contrib-name{flex:1;min-width:0;font-size:.92rem;font-weight:500;line-height:1.3}
.contrib-posts{color:var(--muted);font-size:.8rem;white-space:nowrap}
a.contrib-row:hover .contrib-name{color:var(--accent)}
.tags-cloud{display:flex;flex-wrap:wrap;gap:.4rem}
.tag-cloud-item{padding:.15rem .75rem;border:1.5px solid var(--line);border-radius:99px;color:var(--muted);font-size:.85rem}
.tag-cloud-item:hover{border-color:var(--accent);color:var(--accent)}
.share-list{display:flex;flex-direction:column;gap:6px;max-height:320px;overflow-y:auto;padding-right:2px}
.share-item{display:flex;align-items:center;gap:.7rem;flex:none;padding:.5rem .7rem;border:1.5px solid var(--line);border-radius:10px;background:var(--bg)}
a.share-item:hover{border-color:var(--accent)}
.share-thumb{display:flex;align-items:center;justify-content:center;flex:none;width:32px;height:32px;overflow:hidden;color:var(--accent);font-size:1.1rem;line-height:1}
.share-thumb svg,.share-thumb img{width:85%;height:85%;object-fit:contain}
.share-label{flex:1;min-width:0;overflow:hidden;color:var(--muted);font-size:.85rem;text-overflow:ellipsis;white-space:nowrap}
.share-badge{flex:none;color:var(--accent);font-size:.78rem}

/* Pagination (rendue par renderPagination) */
.pagination{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem;margin-top:1.8rem}
.page-btn{display:flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 .6rem;border:1.5px solid var(--line);border-radius:10px;background:transparent;color:var(--ink);font-weight:500}
.page-btn:hover{border-color:var(--accent)}
.page-btn.active{background:var(--ink);border-color:var(--ink);color:var(--bg)}

/* Sujet et réponses */
.topic-page-title{margin:0 0 1.2rem;font-size:clamp(1.8rem,4vw,2.8rem);font-weight:800;line-height:1.1;letter-spacing:-.02em}
.topic-card,.reply-card{margin-bottom:1rem;padding:1.4rem 1.5rem}
.topic-card{border-top:5px solid var(--c,var(--accent))}
.thread-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.thread-author{display:flex;align-items:center;gap:.8rem}
.thread-author-name{display:flex;align-items:center;gap:.5rem;font-weight:500}
.author-badge{padding:.05rem .6rem;border:1px solid var(--line);border-radius:99px;color:var(--muted);font-size:.75rem;font-weight:400}
.thread-time,.reply-index{color:var(--muted);font-size:.85rem}
.topic-body,.reply-body{line-height:1.75}
.topic-body p,.reply-body p{max-width:75ch;margin:0 0 1rem}
.topic-body p:last-child,.reply-body p:last-child{margin-bottom:0}
.thread-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;margin-top:1.2rem;padding-top:1rem;border-top:1px solid var(--line)}
.btn-accent.thread-action-btn{padding:.35rem .9rem;border:1.5px solid var(--line);background:transparent;color:var(--ink);font-size:.9rem}
.btn-accent.thread-action-btn:hover{border-color:var(--accent);filter:none}
.delete-form{display:flex;margin:0 0 0 auto}
.thread-action-btn.danger{display:flex;align-items:center;gap:.4rem;padding:0;border:0;background:none;color:#C0392B;font:500 .88rem "DM Sans",system-ui,sans-serif;cursor:pointer}
.thread-action-btn.danger:hover{text-decoration:underline}
@media(prefers-color-scheme:dark){.thread-action-btn.danger{color:#FF8A7A}}

.alert-success,.alert-error{margin-bottom:1.2rem;padding:.7rem 1rem;border:1.5px solid;border-radius:10px;font-size:.92rem;font-weight:500}
.alert-success{border-color:#1E7D34;background:rgba(30,125,52,.08);color:#1E7D34}
.alert-error,.np-error{border-color:#C0392B;background:rgba(192,57,43,.08);color:#C0392B}
.np-error{margin-bottom:1.2rem;padding:.7rem 1rem;border:1.5px solid #C0392B;border-radius:10px;font-size:.92rem;font-weight:500}
@media(prefers-color-scheme:dark){
  .alert-success{border-color:#5CD184;background:rgba(92,209,132,.1);color:#5CD184}
  .alert-error,.np-error{border-color:#FF8A7A;background:rgba(255,138,122,.1);color:#FF8A7A}
}

/* Formulaires (réponse, nouveau sujet, signalement) */
.reply-form-card{margin-top:1.5rem;padding:1.4rem 1.5rem}
.reply-form-card h3{margin:0 0 1rem;font:800 1.2rem/1.2 "Bricolage Grotesque","DM Sans",sans-serif}
.np-input,.np-select,.np-textarea,.reply-textarea,.report-modal textarea{width:100%;padding:.7rem .9rem;border:1.5px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);font:inherit}
.np-input:focus,.np-select:focus,.np-textarea:focus,.reply-textarea:focus,.report-modal textarea:focus{border-color:var(--accent)}
.np-textarea{min-height:240px;line-height:1.6;resize:vertical}
.reply-textarea{min-height:140px;border-radius:0 0 10px 10px;line-height:1.6;resize:vertical}
.editor-toolbar{display:flex;gap:.3rem;padding:.4rem;border:1.5px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:var(--surface)}
.editor-btn{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--muted);font:700 .92rem "DM Sans",system-ui,sans-serif;cursor:pointer}
.editor-btn:hover{background:var(--bg);color:var(--accent)}
.reply-form-actions{display:flex;justify-content:flex-end;margin-top:1rem}
.form-group{margin-bottom:1rem}
.np-label,.form-label{display:block;margin-bottom:.35rem;color:var(--muted);font-size:.88rem;font-weight:500}
.np-hint,.form-hint,.np-counter{margin-top:.4rem;color:var(--muted);font-size:.82rem}
.form-hint a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.np-counter{text-align:right}

.np-page{padding:1rem clamp(1rem,5vw,4rem) 3rem}
.np-title{margin:0 0 .5rem;font-size:clamp(2rem,5vw,3.4rem);font-weight:800;line-height:1.05;letter-spacing:-.03em}
.np-sub{margin:0 0 1.6rem;color:var(--muted);font-size:1.1rem}
.np-card{max-width:52rem;padding:clamp(1.2rem,3vw,1.8rem)}
.np-field{margin-bottom:1.3rem}
.np-label span{font-weight:400}
.np-check{display:flex;align-items:center;gap:.6rem;cursor:pointer}
.np-check input{width:18px;height:18px;accent-color:var(--accent)}
.np-actions{display:flex;align-items:center;justify-content:flex-end;gap:1.2rem;margin-top:.4rem}
.btn-cancel{color:var(--muted)}
.btn-cancel:hover{color:var(--ink)}
.np-login{padding:1.5rem 1rem;text-align:center}
.np-login p{margin:0 0 1.2rem;color:var(--muted)}

.empty-state{grid-column:1/-1;padding:3rem 1rem;text-align:center}
.empty-state h2{margin:0 0 .5rem;font-size:clamp(1.6rem,4vw,2.2rem)}
.empty-state p{margin:0 0 1.4rem;color:var(--muted)}

/* Fenêtre de signalement */
.report-overlay{position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;padding:1rem;background:rgba(23,20,31,.6)}
.report-overlay.is-open{display:flex}
.report-modal{width:100%;max-width:440px;padding:1.6rem;border:1.5px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 18px 40px rgba(31,27,46,.25)}
.report-modal-head{display:flex;align-items:center;gap:.7rem}
.report-modal-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--bg)}
.report-modal h3{margin:0;font:800 1.3rem/1.2 "Bricolage Grotesque","DM Sans",sans-serif}
.report-modal-sub{margin:.7rem 0 1rem;color:var(--muted);font-size:.92rem;line-height:1.5}
.report-modal textarea{min-height:100px;resize:vertical}
.report-modal-count{margin-top:.35rem;color:var(--muted);font-size:.8rem;text-align:right}
.report-modal-msg{display:none;margin-top:.9rem;padding:.65rem .9rem;border:1.5px solid;border-radius:10px;font-size:.9rem;font-weight:500}
.report-modal-msg.is-visible{display:block}
.report-modal-msg.success{border-color:#1E7D34;color:#1E7D34}
.report-modal-msg.error{border-color:#C0392B;color:#C0392B}
@media(prefers-color-scheme:dark){.report-modal-msg.success{border-color:#5CD184;color:#5CD184}.report-modal-msg.error{border-color:#FF8A7A;color:#FF8A7A}}
.report-modal-actions{display:flex;justify-content:flex-end;gap:.7rem;margin-top:1.3rem}
.report-btn{padding:.55rem 1.2rem;border:1.5px solid var(--line);border-radius:10px;background:transparent;color:var(--ink);font:500 .95rem "DM Sans",system-ui,sans-serif;cursor:pointer}
.report-btn:hover{border-color:var(--accent)}
.report-btn-submit{border-color:var(--accent);background:var(--accent);color:#fff}
.report-btn-submit:hover{filter:brightness(1.08)}
.report-btn-submit:disabled{opacity:.6;cursor:default}
@media(prefers-color-scheme:dark){.report-btn-submit{color:#17141F}}
@media(max-width:600px){.topic-card,.reply-card,.reply-form-card{padding:1.1rem}.fo-crumbs .current{max-width:12rem}}

/* =====================================================================
   Tutoriels (à coller à la fin de assets/style.css)
   ===================================================================== */
.tuto-toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;padding:1rem clamp(1rem,5vw,4rem) 0}
.tuto-toolbar .filters{margin-bottom:0}
.tuto-filters{display:flex;flex-wrap:wrap;align-items:center;gap:.7rem 1.4rem;padding:1rem clamp(1rem,5vw,4rem) 0}
.tuto-select-wrap{display:flex;align-items:center;gap:.5rem}
.tuto-select-wrap label{color:var(--muted);font-size:.85rem;font-weight:500}
.tuto-select{appearance:none;-webkit-appearance:none;padding:.45rem 2.2rem .45rem 1rem;border:1.5px solid var(--line);border-radius:99px;color:var(--ink);font:inherit;font-size:.9rem;cursor:pointer;
  background-color:var(--surface);
  background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 18px) 55%,calc(100% - 13px) 55%;background-size:5px 5px;background-repeat:no-repeat}
.tuto-select:hover,.tuto-select:focus{border-color:var(--accent)}

.tuto-content{display:flex;flex-direction:column;gap:1.2rem;padding:1.5rem clamp(1rem,5vw,4rem) 3rem}
.tuto-section{--c:#5B4BDB;--t:#fff;min-width:0;padding:1.5rem;background:var(--surface);border:1.5px solid var(--line);border-radius:14px;scroll-margin-top:1.2rem}
.tuto-section[hidden]{display:none}
.tuto-head{display:flex;align-items:center;gap:.9rem;margin-bottom:1.1rem}
.tuto-head-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:var(--c);color:var(--t)}
.tuto-head-icon svg{width:22px;height:22px}
.tuto-head h2{margin:0;font-size:1.2rem;font-weight:800;line-height:1.2}
.tuto-link{margin-left:auto;padding:0;border:0;background:none;color:var(--accent);font:inherit;font-size:.9rem;white-space:nowrap;cursor:pointer}
.tuto-link:hover{text-decoration:underline;text-underline-offset:3px}

.tuto-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.tuto-grid.is-slider{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;padding:6px;margin:-6px}
.tuto-grid.is-slider::-webkit-scrollbar{display:none}
.tuto-grid.is-slider .tuto-card{flex:0 0 min(260px,80%);scroll-snap-align:start}

.tuto-card{display:flex;flex-direction:column;overflow:hidden;background:var(--bg);border:1.5px solid var(--line);border-radius:18px;transition:border-color .15s,transform .15s}
.tuto-card:hover{border-color:var(--c);transform:translateY(-2px)}
.tuto-card[hidden]{display:none}
.tuto-thumb{position:relative;display:grid;place-items:center;aspect-ratio:16/9;background:var(--c);color:var(--t);overflow:hidden;isolation:isolate}
.tuto-thumb .wm{position:absolute;z-index:-1;right:-8%;bottom:-18%;width:55%;height:auto;opacity:.16}
.tuto-play{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:rgba(0,0,0,.24)}
.tuto-play svg{width:18px;height:18px;margin-left:2px}
.tuto-duration{position:absolute;right:10px;bottom:10px;padding:.1rem .6rem;border-radius:99px;background:rgba(0,0,0,.35);color:#fff;font-size:.75rem;line-height:1.5}
.tuto-doc{display:grid;place-items:center;flex:none;width:42px;height:42px;margin:1rem 0 0 1.1rem;border-radius:12px;background:var(--c);color:var(--t)}
.tuto-doc svg{width:22px;height:22px}
.tuto-body{display:flex;flex-direction:column;gap:.5rem;flex:1;padding:1rem 1.1rem 1.2rem}
.tuto-card-written .tuto-body{padding-top:.7rem}
.tuto-meta{display:flex;align-items:center;gap:.5rem;color:var(--muted);font-size:.82rem}
.tuto-type{font-weight:500;color:var(--ink)}
.tuto-body h3{margin:0;font:800 1rem/1.3 "Bricolage Grotesque","DM Sans",sans-serif}
.tuto-level{align-self:flex-start;margin-top:auto;padding:.15rem .65rem;border:1px solid var(--line);border-radius:99px;color:var(--muted);font-size:.75rem;line-height:1.4}

/* Mode liste */
.tuto-content.view-list .tuto-grid,.tuto-content.view-list .tuto-grid.is-slider{display:flex;flex-direction:column;gap:10px;overflow:visible;padding:0;margin:0}
.tuto-content.view-list .tuto-grid .tuto-card{flex:1 1 auto;width:100%}
.tuto-content.view-list .tuto-card{flex-direction:row;align-items:center;border-radius:16px}
.tuto-content.view-list .tuto-card:hover{transform:none}
.tuto-content.view-list .tuto-thumb{flex:none;width:150px}
.tuto-content.view-list .tuto-doc{margin:0 0 0 1.1rem}
.tuto-content.view-list .tuto-body{padding:.8rem 1.1rem;gap:.35rem}
.tuto-content.view-list .tuto-card-written .tuto-body{padding-top:.8rem}

#tuto-vide{margin:0;padding:2rem 0;color:var(--muted);text-align:center}

@media(max-width:640px){
  .tuto-section{padding:1.2rem}
  .tuto-content.view-list .tuto-thumb{width:110px}
}
