/* La vue d'ensemble en widgets (18/11/2026, maquette B choisie par Corentin : « comme le Mac »).
   Une grille de 4 colonnes à l'ordinateur, 2 en dessous ; chaque widget a sa taille : petit (1 × 1),
   moyen (2 × 1), grand (2 × 2), très grand (toute la largeur). Les rangées font au moins 150 px et
   grandissent avec leur contenu : rien n'est coupé. En mode modification, un tiroir « Widgets » s'ouvre à
   droite ; on glisse un widget sur la page, on tire son coin pour changer sa taille.
   Les grands blocs d'avant (Aurore et le bureau, l'agenda, « À vous de jouer »…) gardent leur allure :
   ils sont posés tels quels dans leur case. Rien ici ne s'applique sans la classe wg-actif. */

.wg-actif .ov-grille,.wg-actif .ov-deux,.wg-actif .ov-bas-tete{display:none}
#appView .wg-actif>.va-sur-bandeau{margin:0;padding:0;border:0;background:none;box-shadow:none}
.wg-reserve{display:none}
.wg-actif>#incidentBanner{margin:0 0 16px}

.wg-grille{--wg-gap:16px;--wg-rang:150px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(var(--wg-rang),auto);grid-auto-flow:row dense;gap:var(--wg-gap);margin:0}
.wg{position:relative;min-width:0;display:flex;flex-direction:column}
.wg[data-t="p"]{grid-column:span 1;grid-row:span 1}
.wg[data-t="m"]{grid-column:span 2;grid-row:span 1}
.wg[data-t="g"]{grid-column:span 2;grid-row:span 2}
.wg[data-t="tg"]{grid-column:1/-1;grid-row:span 2}
/* Un grand bloc d'avant remplit sa case. */
#appView .wg>.card,#appView .wg>.va-bandeau{flex:1;margin:0!important;min-width:0;box-sizing:border-box}
#appView .wg>.va-bandeau{border-radius:22px}
.wg .acc-actions:not(:empty){gap:10px;margin:0}
.wg .acc-action{flex-basis:100%;max-width:none}
.wg .acc-calme{margin:0}

/* ---------- Les petites et moyennes tailles ---------- */
.wg-carte{flex:1;display:flex;flex-direction:column;min-width:0;padding:15px 17px 16px;border:1.5px solid #e4d9c2;border-radius:22px;background:#fffcf6;box-shadow:0 1px 0 rgba(32,37,43,.05),0 12px 26px -18px rgba(32,37,43,.35);color:#20252b;overflow:hidden;cursor:pointer;text-align:left}
.wg-carte:hover{border-color:#cdbf9f}
.wg-carte.nuit{background:#1f2a3a;border-color:#1f2a3a;color:#f6ecd4}
.wg-carte.or{background:#e5b95b;border-color:#c99a3a}
.wg-carte.rose{background:#f8e9e2;border-color:#ecd0c4}
.wg-t{display:flex;align-items:center;gap:7px;min-width:0;margin:0 0 8px;font-size:10.5px;line-height:1.2;font-weight:900;letter-spacing:.13em;text-transform:uppercase;color:#8a5f12}
.wg-carte.nuit .wg-t{color:#e5b95b}.wg-carte.or .wg-t{color:#5c4310}.wg-carte.rose .wg-t{color:#a44838}
.wg-tt{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.7;margin:-3px 0}
.wg-ic{display:grid;place-items:center;flex:none;width:20px;height:20px;border-radius:6px;background:#20252b;color:#fffcf6}
.wg-ic .icon{width:12px;height:12px}
.wg-carte.nuit .wg-ic{background:#e5b95b;color:#20252b}
.wg-lien{margin-left:auto;flex:none;padding:0;border:0;background:none;color:inherit;font:800 11.5px/1.2 Inter,sans-serif;letter-spacing:.02em;text-transform:none;text-decoration:underline;text-underline-offset:3px;cursor:pointer;opacity:.85}
.wg-n{margin:2px 0 0;font-family:var(--pix,"Jersey 25",Inter,sans-serif);font-weight:400;font-size:58px;line-height:.8;letter-spacing:.01em;white-space:nowrap}
.wg-n small{margin-left:6px;font-family:Inter,sans-serif;font-size:13px;font-weight:800;letter-spacing:0}
.wg-s{margin:7px 0 0;font-size:13px;line-height:1.35;font-weight:700;opacity:.88;overflow-wrap:anywhere}
.wg-rang{display:flex;align-items:center;gap:18px;flex:1;min-width:0}
.wg-rang>.wg-n{flex:none}
.wg-rang>div,.wg-rang>.wg-l,.wg-rang>.wg-s{flex:1;min-width:0}
.wg-quoi{display:grid;gap:2px;min-width:0}
.wg-quoi b{font-size:15.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.wg-quoi span{font-size:12.5px;opacity:.8}
.wg-l{margin:0;padding:0;list-style:none;min-width:0}
.wg-l li{display:flex;align-items:center;gap:9px;min-width:0;padding:5px 0;border-top:1px solid rgba(32,37,43,.09);font-size:13px;line-height:1.4}
.wg-l li:first-child{border-top:0}
.wg-l .x{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wg-l .q{flex:none;font-size:12px;font-weight:700;opacity:.7}
.wg-k{display:grid;place-items:center;flex:none;min-width:26px;height:26px;padding:0 4px;border-radius:8px;background:#f6dc96;font-family:var(--pix,"Jersey 25",Inter,sans-serif);font-size:20px;line-height:1}
.wg-carte.or .wg-k{background:#fff3cf}
.wg-quand{flex:none;width:86px;font-size:12px;font-weight:800}
.wg-quand.retard{color:#a44838}
.wg-bas{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:auto;padding-top:10px}
.wg-bas small{font-size:12px;opacity:.7}
.wg-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:2px solid #20252b;border-radius:10px;background:#e5b95b;box-shadow:0 3px 0 #20252b;color:#20252b;font:800 12.5px/1.1 Inter,sans-serif;cursor:pointer}
.wg-btn.clair{background:#fffcf6}
.wg-carte.nuit .wg-btn,.wg-carte.nuit .btn{box-shadow:0 3px 0 #0d131c}
.wg-carte.nuit .btn.sm.ghost{color:#f6ecd4;border-color:#f6ecd4}
.wg-men{display:flex;gap:10px;min-width:0}
.wg-men>div{min-width:0}
.wg-men b{font-size:13.5px}
.wg-men small{font-size:12px;opacity:.6}
.wg-men q{display:-webkit-box;margin-top:3px;font-size:13px;line-height:1.35;quotes:none;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.wg-men q i{font-style:normal;font-weight:800;color:#52778a}
.wg-barres{display:flex;align-items:flex-end;gap:7px;height:56px;max-width:190px}
.wg-barres i{flex:1;min-width:10px;border-radius:5px 5px 2px 2px;background:#e7d8b5}
.wg-barres i.c{background:#e5b95b}
.wg-racs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:auto}
.wg-racs.p{grid-template-columns:1fr}
.wg-rac{display:flex;align-items:center;gap:7px;min-width:0;padding:8px 10px;border:1.5px solid #20252b;border-radius:11px;background:#fff;color:#20252b;font:800 12.5px/1.2 Inter,sans-serif;text-align:left;cursor:pointer}
.wg-rac .icon{flex:none;width:15px;height:15px}
.wg-rac:hover{background:#f6dc96}
.wg-l .ov-pp{width:22px;height:28px;image-rendering:pixelated}
.wg-aurore{display:flex;align-items:center;gap:12px}
.wg-aurore canvas{flex:none;width:40px;height:50px;image-rendering:pixelated}
.wg-aurore b{display:block;font-size:22px;line-height:1.05;font-weight:900}
.wg-demande{display:flex;align-items:center;gap:8px;margin-top:auto;padding:5px 5px 5px 14px;border:2px solid #20252b;border-radius:14px;background:#fff}
.wg-demande input{flex:1;min-width:0;padding:7px 0;border:0;background:none;font:500 14px/1.2 Inter,sans-serif;color:#20252b;outline:0}
.wg-demande button{flex:none;display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:50%;background:#20252b;color:#fff;font-size:13px;cursor:pointer}
.wg-demande:focus-within{box-shadow:0 0 0 3px rgba(229,185,91,.6)}
.wg-idees{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.wg-idees button{padding:6px 10px;border:1.5px solid #20252b;border-radius:999px;background:#fffcf6;color:#20252b;font:700 12px/1.2 Inter,sans-serif;cursor:pointer}
.wg-carte :focus-visible,.wg-carte:focus-visible{outline:3px solid #e5b95b;outline-offset:2px}

/* ---------- Le bas de page et la tête du mode modification ---------- */
.wg-pied{display:flex;justify-content:center;margin:22px 0 4px}
.wg-modifier{display:inline-flex;align-items:center;gap:8px}
.wg-edition .wg-pied{display:none}
.wg-tete{display:flex;align-items:center;gap:12px;margin:0 0 16px}
.wg-tete[hidden]{display:none}
.wg-tete>div{flex:1;min-width:0}
.wg-tete .va-fil{margin:0 0 4px}
.wg-tete h2{margin:0;font-size:28px;line-height:1.05;font-weight:900;letter-spacing:-.01em;color:#20252b}
.wg-tete .btn{flex:none}

/* ---------- Le mode modification ---------- */
.wg-edition{padding-right:392px}
.wg-edition .wg{cursor:grab;touch-action:none}
.wg-edition .wg>*:not(.wg-moins):not(.wg-poignee):not(.wg-info){pointer-events:none;user-select:none}
.wg-edition .wg::after{content:"";position:absolute;inset:0;z-index:2;border:2px dashed transparent;border-radius:22px;pointer-events:none}
.wg-edition .wg:hover::after{border-color:#c99a3a}
.wg-edition .wg.wg-tire{opacity:.35}
.wg-edition .wg.wg-tire::after{border-color:#c99a3a;background:rgba(229,185,91,.14)}
.wg-moins,.wg-poignee{display:none}
.wg-edition .wg-moins{position:absolute;top:-8px;left:-8px;z-index:4;display:grid;place-items:center;width:26px;height:26px;padding:0;border:2px solid #fffcf6;border-radius:50%;background:#5a5e64;color:#fff;font:900 17px/1 Inter,sans-serif;box-shadow:0 2px 5px rgba(0,0,0,.3);cursor:pointer}
.wg-edition .wg-moins:hover{background:#a44838}
.wg-edition .wg-poignee{position:absolute;right:4px;bottom:4px;z-index:4;display:block;width:28px;height:28px;padding:0;border:0;background:none;cursor:nwse-resize}
.wg-edition .wg-poignee::before{content:"";position:absolute;right:5px;bottom:5px;width:15px;height:15px;border-right:3.5px solid #20252b;border-bottom:3.5px solid #20252b;border-radius:0 0 9px 0}
.wg-edition .wg-poignee:focus-visible{outline:3px solid #e5b95b;border-radius:8px}
.wg-info{position:absolute;right:36px;bottom:9px;z-index:4;padding:5px 10px;border-radius:8px;background:#20252b;color:#fffcf6;font:800 12px/1.2 Inter,sans-serif;white-space:nowrap;pointer-events:none}
.wg.wg-etire{box-shadow:0 0 0 3px #e5b95b;border-radius:22px}
.wg-fantome{position:fixed;z-index:120;display:grid;place-items:center;border:2.5px solid #20252b;border-radius:22px;background:rgba(255,252,246,.94);box-shadow:0 28px 46px -14px rgba(0,0,0,.5);transform:rotate(2deg);pointer-events:none;color:#20252b;font:900 15px/1.3 Inter,sans-serif;text-align:center}
.wg-fantome small{display:block;font-size:12px;font-weight:700;opacity:.7}
body.wg-geste{user-select:none;-webkit-user-select:none;cursor:grabbing}
.wg-faux{flex:1;padding:7px 0;font-size:14px;color:#7a7e84}
.wg-nouveau{animation:wgArrive 1.2s ease-out}
@keyframes wgArrive{0%{box-shadow:0 0 0 0 rgba(229,185,91,.9)}100%{box-shadow:0 0 0 14px rgba(229,185,91,0)}}

/* ---------- Le tiroir « Widgets » ---------- */
.wg-tiroir{position:fixed;top:var(--wg-haut,64px);right:0;bottom:0;z-index:60;display:flex;flex-direction:column;width:372px;border-left:2px solid #20252b;background:#f6efe0;box-shadow:-16px 0 40px -28px rgba(0,0,0,.5);font-family:Inter,sans-serif}
.wg-tiroir[hidden]{display:none}
.wg-tiroir-tete{padding:18px 18px 10px;border-bottom:1.5px solid #e2d6bd}
.wg-tiroir-tete h3{display:flex;align-items:center;margin:0;font-size:20px;font-weight:900;color:#20252b}
.wg-tiroir-tete h3 button{margin-left:auto}
.wg-tiroir-tete p{margin:4px 0 10px;font-size:12.5px;line-height:1.4;color:#5a5e64}
.wg-cherche{display:flex;align-items:center;gap:8px;padding:0 12px;border:1.5px solid #ddd0b4;border-radius:12px;background:#fffcf6}
.wg-cherche .icon{width:15px;height:15px;color:#7a7e84}
.wg-cherche input{flex:1;min-width:0;padding:9px 0;border:0;background:none;font:500 14px/1.2 Inter,sans-serif;color:#20252b;outline:0}
.wg-cats{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.wg-cats button{padding:5px 11px;border:1.5px solid #20252b;border-radius:999px;background:#fffcf6;color:#20252b;font:800 12.5px/1.2 Inter,sans-serif;cursor:pointer}
.wg-cats button[aria-pressed="true"]{background:#20252b;color:#fffcf6}
.wg-liste{flex:1;overflow:auto;padding:4px 18px 24px}
.wg-entree{padding:13px 0;border-top:1.5px solid #e2d6bd}
.wg-entree:first-child{border-top:0}
.wg-entree-t{display:flex;align-items:center;gap:8px}
.wg-entree-t b{font-size:14.5px;color:#20252b}
.wg-entree-t .wg-sur{margin-left:auto;padding:3px 8px;border-radius:999px;background:#e8efe2;color:#4f6b47;font-size:11px;font-weight:800}
.wg-entree p{margin:2px 0 9px;font-size:12.5px;line-height:1.4;color:#5a5e64}
.wg-vignettes{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}
.wg-vig{display:grid;justify-items:center;gap:5px;padding:4px;border:2px solid transparent;border-radius:12px;background:none;cursor:grab;touch-action:none;font-family:inherit}
.wg-vig:hover{border-color:#cdbf9f}
.wg-vig[aria-current="true"]{border-color:#e5b95b;background:rgba(229,185,91,.16)}
.wg-vig:focus-visible{outline:3px solid #e5b95b}
.wg-vig small{font-size:10.5px;font-weight:800;color:#5a5e64}
.wg-mini{position:relative;overflow:hidden;border-radius:9px;pointer-events:none}
.wg-mini>.wg-carte{position:absolute;left:0;top:0;transform-origin:0 0;transform:scale(.3);box-shadow:none}
.wg-mini.p{width:72px;height:45px}.wg-mini.p>.wg-carte{width:240px;height:150px}
.wg-mini.m{width:149px;height:45px}.wg-mini.m>.wg-carte{width:496px;height:150px}
.wg-mini.g{width:149px;height:95px}.wg-mini.g>.wg-carte{width:496px;height:316px}
.wg-mini.tg{width:302px;height:95px}.wg-mini.tg>.wg-carte{width:1008px;height:316px}
.wg-vide-liste{padding:24px 0;font-size:13px;color:#5a5e64;text-align:center}

/* ---------- Plus étroit : deux colonnes ; au téléphone, le tiroir passe en bas ---------- */
@media (max-width:1280px){.wg-edition{padding-right:340px}.wg-tiroir{width:330px}}
@media (max-width:1100px){
  .wg-grille{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:880px){
  .wg-edition{padding-right:0;padding-bottom:48vh}
  .wg-tiroir{top:auto;left:0;width:auto;height:46vh;border-left:0;border-top:2px solid #20252b;border-radius:20px 20px 0 0}
  .wg-tete{flex-wrap:wrap}
  .wg-tete>div{flex:1 1 100%}
  .wg-tete h2{font-size:22px}
}
@media (max-width:720px){
  .wg-grille{--wg-rang:128px;--wg-gap:12px}
  .wg-n{font-size:48px}
}
@media (prefers-reduced-motion:reduce){.wg-nouveau{animation:none}.wg-fantome{transform:none}}

/* ---------- Taille automatique (style Épuré, 20/11/2026, maquette B) ----------
   Un widget vide quitte la grille ; la ligne « ✓ » sous Aurore le résume, chaque mot mène à sa page. */
.wg.wg-auto-cache{display:none}
.wg-calme{display:flex;align-items:center;flex-wrap:wrap;gap:4px 0;margin:16px 0 0;padding:6px 8px;border:1px solid #ececE8;border-radius:12px;background:#fff}
.wg-actif>.wg-calme{margin:0 0 16px}
.wg-calme-i{position:relative;display:inline-flex;align-items:center;gap:7px;padding:6px 10px;border:0;border-radius:8px;background:none;font:400 13.5px/1.3 var(--font);color:#8a8473;white-space:nowrap;cursor:pointer}
.wg-calme-i+.wg-calme-i{margin-left:9px}
.wg-calme-i+.wg-calme-i::before{content:"";position:absolute;left:-5px;top:8px;bottom:8px;width:1px;background:#ecebe6}
.wg-calme-i:hover{background:#f6f5f1}
.wg-calme-i:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.wg-calme-i i{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#e9f1e7;color:#2f5130;font:600 11px/1 var(--font);font-style:normal}
.wg-calme-i b{font-weight:600;color:#1f1c17}
@media (max-width:760px){.wg-calme-i span{white-space:normal}}
/* Dans l'Épuré, la carte « nuit » (Agenda moyen) est blanche : le bouton clair d'avant (« Voir la préparation »)
   y devenait invisible, crème sur blanc (Corentin, 20/11/2026). Il reprend l'encre. */
html.style-epure .wg-carte.nuit .btn.sm.ghost{color:var(--ink);border-color:#e4e4e0;background:#fff}
