/* =====================================================================
   Cap · tableau de bord des projets
   Papier, encre, crayon et feutre — version épurée.
   Kalam (titres, boutons, navigation) · Public Sans (texte) · JetBrains Mono (chiffres)
   Une couleur, un rôle : bleu = en cours / lien ; orange = attention / action principale.
   ===================================================================== */
:root, [data-theme="papier"]{
  --fond:#F5F2EA; --papier:#FFFDF8; --papier2:#F0ECE2; --encre:#1D2124; --encre2:#5B5F62; --encre3:#8C8F90;
  --filet:rgba(29,33,36,.13); --filet-fort:rgba(29,33,36,.26);
  --bleu:#2F63B0; --bleu-doux:#DCE6F4; --orange:#D46F12; --orange-vif:#E0801F; --orange-doux:#F7E0C8;
  --sur-orange:#FFFFFF; --fantome:rgba(29,33,36,.045);
  --annot:#2F63B0;
  color-scheme: light;
}
[data-theme="charbon"]{
  --fond:#17140F; --papier:#26211C; --papier2:#2F2924; --encre:#F3ECDF; --encre2:#BDB3A3; --encre3:#8A8174;
  --filet:rgba(214,206,190,.16); --filet-fort:rgba(214,206,190,.32);
  --bleu:#6AA6DE; --bleu-doux:#24384C; --orange:#F08A2A; --orange-vif:#FF9636; --orange-doux:#4A3220;
  --sur-orange:#17140F; --fantome:rgba(243,236,223,.05);
  --annot:#7DB4E6;
  color-scheme: dark;
}
*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; }
body{
  background:var(--fond); color:var(--encre);
  font:400 17px/1.5 "Public Sans", system-ui, sans-serif;
  -webkit-font-smoothing:antialiased; overflow:hidden;
}
button,input,textarea,select{ font:inherit; color:inherit; }
button{ cursor:pointer; }
.main{ font-family:"Kalam", "Segoe Print", cursive; font-weight:700; letter-spacing:.01em; }
.mono{ font-family:"JetBrains Mono", ui-monospace, monospace; font-variant-numeric:tabular-nums; }
.discret{ color:var(--encre2); }
.cache{ display:none !important; }
:focus-visible{ outline:2px solid var(--bleu); outline-offset:2px; border-radius:6px; }

/* ---------- squelette : en-tête / vue / navigation ---------- */
.appli{ height:100dvh; display:grid; grid-template-rows:auto 1fr auto; }
.entete{ display:flex; align-items:center; gap:18px; padding:12px 28px; border-bottom:1px solid var(--filet); background:var(--fond); position:relative; z-index:2; }
.logo{ display:flex; align-items:center; gap:2px; font-size:34px; line-height:1; text-decoration:none; color:var(--encre); }
.logo svg{ width:34px; height:34px; margin:0 -1px; transform:translateY(2px); }
.logo .aiguille{ transform-origin:50% 50%; animation:respire 14s ease-in-out infinite; }
@keyframes respire{ 0%,100%{ transform:rotate(-9deg);} 50%{ transform:rotate(11deg);} }
.entete .fil{ font-size:15px; color:var(--encre2); display:flex; gap:8px; align-items:center; min-width:0; flex-wrap:wrap; }
.entete .fil b{ color:var(--encre); font-weight:600; }
.entete .droite{ margin-left:auto; display:flex; gap:10px; align-items:center; }
.releve{ font-size:14px; color:var(--encre2); text-align:right; line-height:1.3; }
.bouton-rond{ width:44px; height:44px; border-radius:50%; border:1px solid var(--filet-fort); background:var(--papier); display:grid; place-items:center; padding:0; }
.bouton-rond svg{ width:22px; height:22px; }

.vue{ position:relative; overflow:hidden; min-height:0; }
.vue > section{ position:absolute; inset:0; display:none; }
.vue > section.active{ display:block; animation:entree .32s cubic-bezier(.2,.7,.2,1); }
@keyframes entree{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:none;} }

.nav{ display:flex; justify-content:center; gap:6px; padding:6px 12px calc(6px + env(safe-area-inset-bottom)); border-top:1px solid var(--filet); background:var(--fond); }
.nav button{ background:none; border:0; min-width:92px; min-height:68px; padding:6px 10px 10px; display:flex; flex-direction:column; align-items:center; gap:2px; color:var(--encre2); position:relative; border-radius:14px; }
.nav button svg{ width:38px; height:38px; }
.nav button span{ font-size:17px; white-space:nowrap; }
.nav button[aria-current="page"]{ color:var(--encre); }
.nav button[aria-current="page"]::after{ /* soulignement au pinceau */
  content:""; position:absolute; left:18%; right:18%; bottom:4px; height:7px; background:var(--orange-vif);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6C18 2 40 3 60 4S88 7 99 3L98 8C80 10 50 7 30 8S8 9 2 9Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6C18 2 40 3 60 4S88 7 99 3L98 8C80 10 50 7 30 8S8 9 2 9Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.nav .badge{ position:absolute; top:6px; right:22px; min-width:22px; height:22px; padding:0 6px; border-radius:11px; background:var(--orange); color:var(--sur-orange); font:600 13px/22px "JetBrains Mono", monospace; }

/* pastille : en sombre, l'icône repose sur un rond de papier */
.pastille{ display:inline-grid; place-items:center; border-radius:50%; background:#FBF7EE; }
[data-theme="papier"] .pastille{ background:transparent; }

/* ---------- boutons ---------- */
.btn{ display:inline-flex; align-items:center; gap:10px; min-height:52px; padding:8px 20px; border-radius:12px; border:1px solid var(--filet-fort); background:var(--papier); font-family:"Kalam", cursive; font-weight:700; font-size:19px; }
.btn svg{ width:30px; height:30px; }
.btn:hover{ background:var(--papier2); }
.btn-principal{ /* orange au bord droit en coups de pinceau */
  border:0; background:var(--orange); color:var(--sur-orange); padding:8px 34px 8px 22px; border-radius:12px 0 0 12px;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H24C30 6 26 12 33 18S28 30 36 38S30 50 38 58S31 70 37 80S29 92 32 100H0Z'/%3E%3C/svg%3E") right/28px 100% no-repeat, linear-gradient(#000,#000) left/calc(100% - 27px) 100% no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H24C30 6 26 12 33 18S28 30 36 38S30 50 38 58S31 70 37 80S29 92 32 100H0Z'/%3E%3C/svg%3E") right/28px 100% no-repeat, linear-gradient(#000,#000) left/calc(100% - 27px) 100% no-repeat;
}
.btn-principal:hover{ background:var(--orange-vif); }
.btn-principal .pastille{ background:#FBF7EE; width:36px; height:36px; }
.btn-principal .pastille svg{ width:30px; height:30px; }
.btn-lien{ background:none; border:0; color:var(--bleu); font-weight:600; padding:6px 4px; min-height:44px; }
.btn-lien:hover{ text-decoration:underline; text-underline-offset:4px; }

/* annotation manuscrite bleue avec flèche */
.annotation{ font-family:"Kalam", cursive; color:var(--annot); font-size:19px; display:flex; align-items:flex-end; gap:6px; line-height:1.15; }
.annotation svg{ width:56px; height:38px; flex:none; }

/* ---------- états : couleur + forme + mot ---------- */
.etat{ display:inline-flex; align-items:center; gap:6px; font-size:15px; font-weight:600; padding:2px 10px 2px 8px; border-radius:20px; white-space:nowrap; border:1px solid currentColor; }
.etat i{ font-style:normal; font-size:13px; width:14px; text-align:center; }
.etat.en_cours{ color:var(--bleu); }
.etat.en_attente{ color:var(--orange); }
.etat.bloque{ color:var(--orange); background:repeating-linear-gradient(-45deg, var(--orange-doux) 0 4px, transparent 4px 8px); }
.etat.en_pause{ color:var(--encre2); border-style:dashed; }
.etat.termine{ color:var(--encre2); }
.etat.a_lancer{ color:var(--encre2); }

.jauge{ height:6px; border-radius:3px; background:var(--fantome); overflow:hidden; box-shadow:inset 0 0 0 1px var(--filet); }
.jauge > b{ display:block; height:100%; background:var(--bleu); border-radius:3px; }
.etiquette{ display:inline-block; font-size:14px; padding:1px 9px; border-radius:6px; background:var(--fantome); color:var(--encre2); white-space:nowrap; }
.prio{ font:600 14px/1 "JetBrains Mono", monospace; color:var(--encre2); border:1px solid var(--filet-fort); border-radius:6px; padding:4px 6px; }
.prio.p1{ color:var(--sur-orange); background:var(--orange); border-color:var(--orange); }

/* ---------- accueil ---------- */
.accueil{ display:grid; grid-template-columns:minmax(330px, 30%) 1fr; height:100%; }
.cap{ position:relative; padding:30px 28px 22px; border-right:1px solid var(--filet); display:flex; flex-direction:column; gap:18px; overflow:auto; }
.cap .fond-boussole{ position:absolute; right:-90px; bottom:-70px; width:380px; height:380px; opacity:.07; pointer-events:none; color:var(--encre); }
.cap h1{ font-size:34px; line-height:1.1; margin:0; }
.cap h1 em{ font-style:normal; color:var(--orange); }
.cap .resume-ia{ margin:0; color:var(--encre2); font-size:16px; }
.cap ol{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; counter-reset:c; position:relative; }
.cap li{ counter-increment:c; display:grid; grid-template-columns:34px 1fr; gap:10px; align-items:start; padding:12px 14px; background:var(--papier); border:1px solid var(--filet); border-radius:12px; cursor:pointer; }
.cap li:hover{ border-color:var(--filet-fort); }
.cap li::before{ content:counter(c); font:700 24px/1.1 "Kalam", cursive; color:var(--orange); text-align:center; }
.cap li b{ display:block; font-weight:600; }
.cap li small{ display:block; color:var(--encre2); font-size:14px; margin-top:2px; }
.chiffres{ display:grid; grid-template-columns:repeat(2, 1fr); gap:10px; position:relative; }
.chiffre{ padding:10px 14px; border-radius:12px; background:var(--fantome); cursor:pointer; border:0; text-align:left; }
.chiffre .mono{ font-size:30px; font-weight:600; line-height:1.1; display:block; }
.chiffre span:last-child{ font-size:14px; color:var(--encre2); }
.chiffre.attention .mono{ color:var(--orange); }
.cap .bas{ margin-top:auto; display:flex; flex-direction:column; gap:12px; position:relative; }

.tuiles-zone{ overflow:auto; padding:24px 28px 30px; }
.bande{ margin-bottom:22px; }
.bande h2{ font-size:22px; margin:0 0 10px; display:flex; align-items:baseline; gap:10px; }
.bande h2 small{ font-family:"Public Sans", sans-serif; font-weight:400; font-size:15px; color:var(--encre2); }
.tuiles{ display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:14px; }
.bande.p1 .tuiles{ grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); }
.tuile{ position:relative; text-align:left; background:var(--papier); border:1px solid var(--filet); border-radius:16px; padding:14px 16px 14px; display:grid; grid-template-columns:64px 1fr; gap:4px 12px; align-items:start; transition:border-color .2s, transform .25s cubic-bezier(.2,.7,.2,1); }
.tuile:hover{ border-color:var(--filet-fort); transform:translateY(-2px); }
.tuile .ico{ grid-row:span 2; width:64px; height:64px; }
.tuile .ico svg, .tuile .ico .pastille{ width:64px; height:64px; }
.tuile .ico .pastille svg{ width:54px; height:54px; }
.tuile h3{ margin:0; font-size:22px; line-height:1.15; padding-right:46px; }
.tuile .meta{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:14px; color:var(--encre2); }
.tuile .suite{ grid-column:1 / -1; font-size:15px; color:var(--encre); margin:6px 0 0; }
.tuile .suite::before{ content:"→ "; color:var(--orange); font-weight:700; }
.tuile .bas{ grid-column:1 / -1; display:flex; align-items:center; gap:10px; margin-top:6px; font-size:14px; color:var(--encre2); }
.tuile .bas .jauge{ flex:1; }
.tuile .coin{ position:absolute; top:12px; right:12px; display:flex; gap:6px; }
.bande.reste .tuile{ grid-template-columns:44px 1fr; padding:10px 14px; }
.bande.reste .tuile .ico, .bande.reste .tuile .ico svg, .bande.reste .tuile .ico .pastille{ width:44px; height:44px; }
.bande.reste .tuile .ico .pastille svg{ width:38px; height:38px; }
.bande.reste .tuile h3{ font-size:19px; }

/* ---------- fiche projet ---------- */
.fiche{ display:grid; grid-template-rows:auto auto 1fr; height:100%; }
.fiche-tete{ display:grid; grid-template-columns:auto 96px 1fr auto; gap:6px 20px; align-items:center; padding:20px 28px 14px; position:relative; }
.fiche-tete .grand{ width:96px; height:96px; }
.fiche-tete .grand svg, .fiche-tete .grand .pastille{ width:96px; height:96px; }
.fiche-tete .grand .pastille svg{ width:80px; height:80px; }
.fiche-tete h1{ margin:0; font-size:38px; line-height:1.05; }
.fiche-tete .meta{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px; color:var(--encre2); font-size:15px; }
.fiche-tete .avance{ display:flex; align-items:center; gap:12px; margin-top:10px; max-width:520px; }
.fiche-tete .avance .jauge{ flex:1; height:8px; }
.fiche-tete .avance .mono{ font-size:22px; font-weight:600; }
.fiche-tete .actions{ display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.retour{ width:48px; height:48px; }
.reglage-ligne{ display:flex; gap:6px; align-items:center; font-size:14px; color:var(--encre2); flex-wrap:wrap; justify-content:flex-end; }
.reglage-ligne select{ min-height:40px; border-radius:8px; border:1px solid var(--filet-fort); background:var(--papier); padding:4px 8px; }
.pas{ width:40px; height:40px; border-radius:8px; border:1px solid var(--filet-fort); background:var(--papier); font:600 18px/1 "JetBrains Mono", monospace; }
.onglets{ display:flex; gap:4px; padding:0 22px; border-bottom:1px solid var(--filet); overflow-x:auto; scrollbar-width:none; }
.onglets button{ background:none; border:0; padding:10px 14px 14px; font-family:"Kalam", cursive; font-weight:700; font-size:19px; color:var(--encre2); position:relative; white-space:nowrap; min-height:52px; }
.onglets button[aria-selected="true"]{ color:var(--encre); }
.onglets button[aria-selected="true"]::after{ content:""; position:absolute; left:10px; right:10px; bottom:4px; height:6px; background:var(--orange-vif);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6C18 2 40 3 60 4S88 7 99 3L98 8C80 10 50 7 30 8S8 9 2 9Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6C18 2 40 3 60 4S88 7 99 3L98 8C80 10 50 7 30 8S8 9 2 9Z'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.onglets .nb{ font:600 13px "JetBrains Mono", monospace; color:var(--encre3); margin-left:4px; }
.panneau{ overflow:auto; padding:22px 28px 30px; }
.colonnes{ display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:18px; align-items:start; max-width:1400px; }
.bloc{ background:var(--papier); border:1px solid var(--filet); border-radius:14px; padding:16px 18px; }
.bloc h3{ margin:0 0 8px; font-size:21px; display:flex; align-items:center; gap:8px; }
.bloc h3 svg, .bloc h3 .pastille{ width:34px; height:34px; flex:none; }
.bloc h3 .pastille svg{ width:28px; height:28px; }
.btn .pastille{ width:34px; height:34px; } .btn .pastille svg{ width:28px; height:28px; }
.bloc p{ margin:0 0 8px; }
.bloc.mis-en-avant{ border-color:var(--orange); box-shadow:inset 4px 0 0 var(--orange); }
.liste{ list-style:none; margin:0; padding:0; }
.liste li{ display:flex; gap:10px; padding:8px 0; border-top:1px solid var(--filet); align-items:flex-start; }
.liste li:first-child{ border-top:0; }
.liste li .puce{ flex:none; width:20px; text-align:center; color:var(--orange); font-weight:700; }
.liste a{ color:var(--bleu); text-decoration:none; font-weight:600; overflow-wrap:anywhere; }
.liste a:hover{ text-decoration:underline; text-underline-offset:4px; }
.liste .date{ font:500 13px "JetBrains Mono", monospace; color:var(--encre3); flex:none; padding-top:3px; width:92px; }
.chemin{ font:500 14px "JetBrains Mono", monospace; color:var(--encre2); overflow-wrap:anywhere; background:var(--fantome); padding:6px 10px; border-radius:8px; display:block; }

/* ---------- tâches ---------- */
.ecran-liste{ display:grid; grid-template-rows:auto 1fr; height:100%; }
.barre-outils{ display:flex; gap:12px; align-items:center; padding:18px 28px 14px; flex-wrap:wrap; border-bottom:1px solid var(--filet); }
.barre-outils h1{ margin:0 12px 0 0; font-size:32px; }
.saisie{ display:flex; gap:8px; flex:1 1 100%; max-width:980px; }
.barre-outils .saisie{ order:3; }
.saisie input, .saisie select, textarea, .champ{ min-height:52px; border-radius:12px; border:1px solid var(--filet-fort); background:var(--papier); padding:10px 14px; }
.saisie input{ flex:1; min-width:200px; }
.saisie select{ max-width:220px; }
.filtres{ display:flex; gap:6px; flex-wrap:wrap; margin-left:auto; }
.filtre{ min-height:40px; padding:4px 14px; border-radius:20px; border:1px solid var(--filet-fort); background:none; font-size:15px; }
.filtre[aria-pressed="true"]{ background:var(--encre); color:var(--fond); border-color:var(--encre); }
.colonnes-taches{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:18px; padding:20px 28px 28px; overflow:auto; align-items:start; }
.colonne h2{ font-size:22px; margin:0 0 10px; display:flex; gap:8px; align-items:baseline; }
.colonne h2 .mono{ font-size:15px; color:var(--encre3); }
.tache{ display:grid; grid-template-columns:36px 1fr auto; gap:10px; align-items:start; padding:10px 12px; background:var(--papier); border:1px solid var(--filet); border-radius:12px; margin-bottom:8px; }
.tache.faite{ opacity:.55; }
.tache.faite .texte{ text-decoration:line-through; text-decoration-color:var(--encre3); }
.case{ width:34px; height:34px; border-radius:8px; border:1.5px solid var(--encre2); background:var(--papier); display:grid; place-items:center; padding:0; }
.case svg{ width:24px; height:24px; opacity:0; }
.tache.faite .case svg, .case[aria-checked="true"] svg{ opacity:1; }
.tache .texte{ font-size:16px; }
.tache .sous{ display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
.tache .menu{ display:flex; gap:2px; }
.mini{ width:36px; height:36px; border-radius:8px; border:0; background:none; color:var(--encre2); font:600 15px "JetBrains Mono", monospace; display:grid; place-items:center; padding:0; }
.mini:hover{ background:var(--fantome); color:var(--encre); }
.mini svg{ width:20px; height:20px; }
.vide{ color:var(--encre3); font-family:"Kalam", cursive; font-size:19px; padding:10px 4px; }

/* ---------- idées ---------- */
.idees{ display:grid; grid-template-columns:minmax(340px, 34%) 1fr; height:100%; }
.capture{ padding:26px 28px; border-right:1px solid var(--filet); display:flex; flex-direction:column; gap:14px; overflow:auto; position:relative; }
.capture h1{ margin:0; font-size:32px; }
.capture textarea{ width:100%; min-height:190px; resize:vertical; font-size:18px; line-height:1.5; }
.capture textarea::placeholder{ font-family:"Kalam", cursive; color:var(--encre3); font-size:20px; }
.choix{ display:flex; gap:6px; flex-wrap:wrap; }
.capture .ligne{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.capture select{ flex:1; min-width:180px; }
.mur{ overflow:auto; padding:24px 28px; display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:14px; align-content:start; }
.note{ background:var(--papier); border:1px solid var(--filet); border-radius:4px 14px 14px 14px; padding:14px 16px 12px; display:flex; flex-direction:column; gap:8px; position:relative; }
.note.souci{ box-shadow:inset 4px 0 0 var(--orange); }
.note.idee{ box-shadow:inset 4px 0 0 var(--bleu); }
.note .texte{ white-space:pre-wrap; overflow-wrap:anywhere; font-size:16px; }
.note .lecture{ font-family:"Kalam", cursive; color:var(--annot); font-size:17px; line-height:1.25; border-top:1px dashed var(--filet-fort); padding-top:8px; }
.note .pied{ display:flex; gap:6px; align-items:center; flex-wrap:wrap; font-size:13px; color:var(--encre3); }
.note .pied .mini{ margin-left:auto; }

/* ---------- garde-cap (IA) ---------- */
.garde{ height:100%; overflow:auto; padding:26px 28px 30px; }
.garde-tete{ display:flex; gap:18px; align-items:center; flex-wrap:wrap; margin-bottom:18px; }
.garde-tete h1{ margin:0; font-size:34px; }
.garde-tete .discret{ font-size:15px; }
.garde .colonnes{ max-width:none; }
.proposee{ display:grid; grid-template-columns:36px 1fr; gap:10px; align-items:start; padding:8px 0; border-top:1px solid var(--filet); }
.proposee:first-child{ border-top:0; }
.proposee .sous{ display:flex; gap:6px; flex-wrap:wrap; margin-top:3px; }
.centre-vide{ display:grid; place-items:center; height:70%; text-align:center; }
.centre-vide > div{ max-width:520px; display:flex; flex-direction:column; align-items:center; gap:14px; }
.centre-vide .grand-ico{ width:140px; height:140px; }
.centre-vide .grand-ico svg{ width:140px; height:140px; }
.centre-vide h2{ margin:0; font-size:30px; }

/* ---------- chargement, messages, fenêtres ---------- */
.chargement{ position:fixed; inset:0; display:grid; place-items:center; background:color-mix(in srgb, var(--fond) 82%, transparent); z-index:20; }
.chargement > div{ display:flex; flex-direction:column; align-items:center; gap:16px; font-family:"Kalam", cursive; font-size:22px; text-align:center; max-width:420px; padding:20px; }
.rond{ width:56px; height:56px; border-radius:50%; border:4px solid var(--filet-fort); border-top-color:var(--orange); animation:tourne 1s linear infinite; }
@keyframes tourne{ to{ transform:rotate(360deg);} }
.fenetre-fond{ position:fixed; inset:0; background:rgba(10,9,7,.48); display:grid; place-items:center; z-index:30; padding:20px; }
.fenetre{ background:var(--papier); border-radius:18px; padding:26px 28px 22px; width:min(520px, 100%); border:1px solid var(--filet-fort); display:flex; flex-direction:column; gap:14px; }
.fenetre h2{ margin:0; font-size:28px; }
.fenetre p{ margin:0; font-size:17px; }
.fenetre .boutons{ display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; margin-top:6px; }
.fenetre textarea, .fenetre input, .fenetre select{ width:100%; }
.message{ position:fixed; left:50%; top:84px; transform:translateX(-50%); background:var(--encre); color:var(--fond); padding:12px 22px; border-radius:12px; z-index:40; font-weight:600; max-width:min(560px, 92vw); text-align:center; animation:entree .25s; }

/* ---------- connexion ---------- */
.connexion{ height:100dvh; display:grid; place-items:center; position:relative; overflow:hidden; }
.connexion .fond-boussole{ position:absolute; width:900px; height:900px; right:-260px; bottom:-300px; opacity:.06; color:var(--encre); }
.connexion form{ position:relative; display:flex; flex-direction:column; gap:16px; width:min(400px, 90vw); }
.connexion .logo{ font-size:72px; }
.connexion .logo svg{ width:70px; height:70px; }
.connexion input{ min-height:56px; border-radius:12px; border:1px solid var(--filet-fort); background:var(--papier); padding:10px 16px; font-size:19px; }
.connexion .erreur{ color:var(--orange); font-weight:600; min-height:24px; }

/* ---------- téléphone ---------- */
@media (max-width: 860px){
  body{ font-size:18px; }
  .entete{ padding:10px 16px; gap:10px; }
  .entete .fil, .releve{ display:none; }
  .accueil, .idees{ grid-template-columns:1fr; grid-template-rows:auto 1fr; }
  .accueil{ overflow:auto; display:block; }
  .cap{ border-right:0; border-bottom:1px solid var(--filet); overflow:visible; padding:20px 16px; }
  .cap .fond-boussole{ display:none; }
  .tuiles-zone{ overflow:visible; padding:18px 16px; }
  .tuiles, .bande.p1 .tuiles{ grid-template-columns:1fr; }
  .capture{ border-right:0; border-bottom:1px solid var(--filet); padding:18px 16px; }
  .idees{ overflow:auto; display:block; }
  .mur{ overflow:visible; padding:18px 16px; grid-template-columns:1fr; }
  .colonnes-taches{ grid-template-columns:1fr; padding:16px; }
  .barre-outils{ padding:14px 16px; }
  .fiche-tete{ grid-template-columns:auto 64px 1fr; padding:14px 16px; }
  .fiche-tete .grand, .fiche-tete .grand svg, .fiche-tete .grand .pastille{ width:64px; height:64px; }
  .fiche-tete h1{ font-size:30px; }
  .fiche-tete .actions{ grid-column:1 / -1; align-items:stretch; }
  .reglage-ligne{ justify-content:flex-start; }
  .panneau, .garde{ padding:16px; }
  .nav{ gap:0; }
  .nav button{ min-width:0; flex:1; padding:6px 2px 10px; }
  .nav button span{ font-size:14px; }
  .nav button svg, .nav button .pastille{ width:32px; height:32px; }
}
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation:none !important; transition:none !important; }
}
