/* ==========================================================================
   Ezeron — écrans hors éditeur : connexion, invitation, accueil, membres (style des maquettes validées)
   ========================================================================== */
:root {
  --fond: #f5f2ec; --surface: #ffffff; --surface-2: #faf8f4; --survol: #f0ece4;
  --ligne: #e6e0d5; --ligne-forte: #d6cec0;
  --encre: #1f1c18; --encre-2: #5d564c; --encre-3: #918a7e;
  --accent: #c4543b; --accent-fonce: #a8432d; --accent-doux: #f8e6df;
  --vert: #2e8b62; --vert-doux: #e3f2ea; --alerte: #c0392b;
  --rayon: 10px; --rayon-petit: 7px;
  --ombre: 0 1px 2px rgba(40, 30, 20, .06), 0 4px 16px rgba(40, 30, 20, .06);
  --ombre-forte: 0 2px 6px rgba(40, 30, 20, .08), 0 18px 48px rgba(40, 30, 20, .16);
  --ui: "Figtree", system-ui, sans-serif;
  --marque: "Fraunces", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 14px/1.45 var(--ui); color: var(--encre); background: var(--fond); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-fonce); }
[hidden] { display: none !important; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.petit { width: 15px; height: 15px; }
.flex { flex: 1; }
.attenue { color: var(--encre-3); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--rayon-petit);
  border: 1px solid var(--ligne); background: var(--surface); font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--encre); }
.btn:hover:not(:disabled) { background: var(--survol); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primaire { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primaire:hover:not(:disabled) { background: var(--accent-fonce); }
.btn.discret { border-color: transparent; background: transparent; }
.btn.ic { width: 34px; padding: 0; justify-content: center; }
.btn.danger { color: #a33; }
.marque { display: flex; align-items: center; gap: 9px; font: 600 19px/1 var(--marque); color: var(--encre); text-decoration: none; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font: italic 600 19px/1 var(--marque); box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: 12px; flex: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 500; background: var(--survol); color: var(--encre-2); }
.champ { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--encre-2); }
.champ input, .champ select { height: 40px; border: 1px solid var(--ligne-forte); border-radius: var(--rayon-petit); padding: 0 12px; background: #fff; color: var(--encre); font-size: 14.5px; }
.champ input:focus, .champ select:focus { outline: 2px solid var(--accent-doux); border-color: var(--accent); }
.erreur { color: var(--alerte); font-size: 13.5px; margin: 0 0 12px; min-height: 1em; }
.message { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--encre); color: #fff; padding: 10px 18px; border-radius: var(--rayon); z-index: 100; opacity: 0; transition: opacity .25s; pointer-events: none; }
.message.visible { opacity: 1; }

/* ------------------------------------------------------------------ connexion, invitation */
.carte-seule { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.carte-seule .carte { width: 400px; max-width: 100%; background: var(--surface); border-radius: 16px; box-shadow: var(--ombre-forte); padding: 30px 30px 24px; }
.carte-seule .marque { margin-bottom: 22px; font-size: 22px; }
.carte-seule .marque .logo { width: 36px; height: 36px; font-size: 22px; }
.carte-seule h1 { font-size: 20px; margin-bottom: 6px; }
.carte-seule p.intro { color: var(--encre-2); margin: 0 0 18px; }
.carte-seule .btn.primaire { width: 100%; justify-content: center; height: 42px; font-size: 15px; }
.carte-seule .pied { margin-top: 16px; font-size: 12.5px; color: var(--encre-3); text-align: center; }

/* ------------------------------------------------------------------ coquille (accueil, membres) */
.appli { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.cote { background: var(--surface-2); border-right: 1px solid var(--ligne); display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; position: sticky; top: 0; height: 100vh; }
.cote .marque { padding: 4px 8px 14px; }
.espace-choix { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--rayon); border: 1px solid var(--ligne); background: var(--surface); width: 100%; text-align: left; margin-bottom: 10px; position: relative; }
.espace-choix:hover { border-color: var(--ligne-forte); }
.espace-logo { width: 32px; height: 32px; border-radius: 8px; background: #1f4e9a; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; text-transform: uppercase; }
.espace-choix b { display: block; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.espace-choix small { color: var(--encre-3); font-size: 12px; }
.espaces-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 6px; z-index: 20; }
.espaces-menu a, .espaces-menu button { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--rayon-petit); font-size: 13.5px; color: var(--encre); text-decoration: none; width: 100%; border: 0; background: none; text-align: left; }
.espaces-menu a:hover, .espaces-menu button:hover { background: var(--survol); }
.espaces-menu .espace-logo { width: 26px; height: 26px; font-size: 11px; }
.espaces-menu hr { border: 0; border-top: 1px solid var(--ligne); margin: 5px 0; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--rayon-petit); color: var(--encre-2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--survol); color: var(--encre); }
.nav a.actif { background: var(--surface); color: var(--encre); box-shadow: var(--ombre); }
.nav a .compte { margin-left: auto; font-size: 12px; color: var(--encre-3); }
.moi { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--rayon-petit); }
.moi small { display: block; color: var(--encre-3); }
.principal { min-width: 0; }
.contenu { max-width: 1120px; margin: 0 auto; padding: 28px 40px 80px; }
.entete-page { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.entete-page h1 { font-size: 24px; }
.section-titre { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 14px; }
.section-titre h2 { font-size: 15px; }

/* Créer */
.gabarits { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.gabarit { background: none; border: 0; padding: 0; text-align: left; align-self: start; }
.gabarit .vignette { aspect-ratio: 1 / 1.05; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--ligne); display: grid; place-items: center; overflow: hidden; transition: transform .15s, box-shadow .15s; position: relative; }
.gabarit:hover .vignette { transform: translateY(-2px); box-shadow: var(--ombre); }
.gabarit b { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 600; }
.gabarit small { color: var(--encre-3); font-size: 12px; }
.gabarit.vedette .vignette { background: linear-gradient(160deg, #fbeee8, #f3ddd3); border-color: #efd3c8; }
.feuille { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.14); border-radius: 2px; display: grid; place-items: center; color: var(--encre-3); }
.feuille.chemin { background: #fff url(/client/gabarits/le-chemin/img/bandeau.jpg) top left / 60% auto no-repeat; position: relative; }
.feuille.chemin::after { content: "Le Chemin"; position: absolute; top: 34%; left: 0; right: 0; text-align: center; font: 800 12px/1 Montserrat, sans-serif; color: #7dc0e0; -webkit-text-stroke: .6px #004456; }
.gabarit .etiquette { position: absolute; top: 8px; left: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* Documents */
.documents { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 18px; }
.doc { display: block; text-decoration: none; color: var(--encre); position: relative; }
.doc .apercu { aspect-ratio: 1 / 1.1; border-radius: var(--rayon); background: #ebe6dd; display: grid; place-items: center; overflow: hidden; transition: box-shadow .15s; }
.doc:hover .apercu { box-shadow: var(--ombre); }
.doc .apercu .feuille { width: 60%; }
.feuille-titre { padding: 10%; font: 600 11px/1.25 var(--marque); color: var(--encre-2); text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.doc b { display: block; margin-top: 10px; font-size: 14px; font-weight: 600; }
.doc small { color: var(--encre-3); font-size: 12.5px; }
.doc .menu-doc { position: absolute; top: 8px; right: 8px; opacity: 0; background: rgba(255,255,255,.95); }
.doc:hover .menu-doc, .doc .menu-doc:focus { opacity: 1; }
.vide { padding: 40px; text-align: center; color: var(--encre-2); background: var(--surface); border: 1.5px dashed var(--ligne-forte); border-radius: var(--rayon); }

/* Membres */
.carte { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); }
.tableau { width: 100%; border-collapse: collapse; }
.tableau th { text-align: left; font-size: 12px; font-weight: 600; color: var(--encre-3); text-transform: uppercase; letter-spacing: .04em; padding: 12px 18px; border-bottom: 1px solid var(--ligne); }
.tableau td { padding: 12px 18px; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.personne { display: flex; align-items: center; gap: 12px; }
.personne small { display: block; color: var(--encre-3); font-size: 12.5px; }
.choix-role { height: 32px; border: 1px solid var(--ligne); border-radius: var(--rayon-petit); padding: 0 8px; background: var(--surface); }
.aide-role { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.aide-role div { padding: 12px 14px; border-radius: var(--rayon); background: var(--surface-2); border: 1px solid var(--ligne); font-size: 13px; color: var(--encre-2); }
.aide-role b { display: block; color: var(--encre); margin-bottom: 2px; }

/* Fenêtres */
dialog.fenetre { width: 500px; max-width: calc(100vw - 32px); border: 0; border-radius: 14px; padding: 22px 24px 18px; box-shadow: var(--ombre-forte); color: var(--encre); }
dialog.fenetre::backdrop { background: rgba(31, 28, 24, .32); backdrop-filter: blur(2px); }
dialog.fenetre h2 { font-size: 18px; margin-bottom: 6px; }
dialog.fenetre .aide { color: var(--encre-2); font-size: 13px; margin: 6px 0 14px; }
dialog.fenetre menu { display: flex; justify-content: flex-end; gap: 8px; margin: 18px 0 0; padding: 0; }
dialog.fenetre .lien-copie { display: flex; gap: 8px; }
dialog.fenetre .lien-copie input { flex: 1; height: 36px; border: 1px solid var(--ligne); border-radius: var(--rayon-petit); padding: 0 10px; font-size: 13px; color: var(--encre-2); background: var(--surface-2); }
dialog.fenetre .ligne-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.coche { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; }
.coche input { margin-top: 3px; accent-color: var(--accent); }
