:root {
  --bleu: #1d4ed8;
  --bleu-fonce: #1e3a8a;
  --bleu-clair: #eff6ff;
  --vert: #16a34a;
  --texte: #1f2937;
  --texte-doux: #6b7280;
  --bord: #e5e7eb;
  --fond: #f8fafc;
  --carte: #ffffff;
  --ombre: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --ombre-forte: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --largeur-nav: 250px;
  --hauteur-entete: 58px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--texte);
  background: var(--fond);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--bleu); color: #fff;
  padding: 8px 14px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── En-tête ── */
.entete {
  position: sticky; top: 0; z-index: 40;
  height: var(--hauteur-entete);
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(120deg, var(--bleu-fonce), var(--bleu));
  color: #fff; padding: 0 16px; box-shadow: var(--ombre);
}
.menu-bascule {
  display: none; background: rgba(255, 255, 255, 0.15); border: 0; color: #fff;
  font-size: 20px; width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
}
.marque { display: flex; align-items: center; gap: 10px; color: #fff; }
.marque:hover { text-decoration: none; }
.marque-logo { font-size: 24px; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.1; }
.marque-texte strong { font-size: 16px; }
.marque-texte small { font-size: 11px; opacity: 0.85; }

/* ── Mise en page ── */
.mise-en-page { display: flex; min-height: calc(100vh - var(--hauteur-entete)); }

.barre-laterale {
  width: var(--largeur-nav); flex-shrink: 0; background: var(--carte);
  border-right: 1px solid var(--bord); padding: 16px 12px; position: sticky;
  top: var(--hauteur-entete); height: calc(100vh - var(--hauteur-entete));
  overflow-y: auto;
}
.nav-section {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--texte-doux); margin: 18px 10px 6px; font-weight: 600;
}
.nav-lien {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 9px; color: var(--texte); font-weight: 500; font-size: 14.5px;
  margin-bottom: 2px;
}
.nav-lien:hover { background: var(--bleu-clair); text-decoration: none; }
.nav-lien.actif { background: var(--bleu); color: #fff; }
.nav-ico { font-size: 17px; }
.barre-pied { margin-top: 24px; padding: 10px; color: var(--texte-doux); }

.voile {
  position: fixed; inset: var(--hauteur-entete) 0 0 0; background: rgba(0, 0, 0, 0.4);
  z-index: 30;
}

.contenu { flex: 1; min-width: 0; padding: 28px 32px 80px; }
.vue, .vue-accueil { max-width: 960px; margin: 0 auto; animation: apparait 0.25s ease; }
@keyframes apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 19px; }
.intro { color: var(--texte-doux); font-size: 15px; margin: 0 0 22px; max-width: 70ch; }

/* ── Cartes génériques ── */
.carte {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--ombre); margin-bottom: 18px;
}
.carte h2 { margin-top: 0; }
.carte.encart { background: var(--bleu-clair); border-color: #dbeafe; }
.carte.avertissement { background: #fff7ed; border-color: #fed7aa; }
.carte.vide { text-align: center; color: var(--texte-doux); }
.aide { color: var(--texte-doux); font-size: 13.5px; }
.aide-mini { font-size: 13px; margin: 6px 0; }

/* ── Accueil ── */
.hero {
  background: linear-gradient(120deg, var(--bleu-fonce), var(--bleu));
  color: #fff; border-radius: 16px; padding: 34px 30px; margin-bottom: 24px;
  box-shadow: var(--ombre-forte);
}
.hero h1 { color: #fff; font-size: 28px; }
.hero-sous { color: #e0e7ff; font-size: 16px; max-width: 75ch; margin: 8px 0 0; }

.modules-grille { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 24px; }
.module-carte {
  display: flex; align-items: center; gap: 16px; background: var(--carte);
  border: 1px solid var(--bord); border-radius: var(--radius); padding: 18px 20px;
  color: var(--texte); box-shadow: var(--ombre); transition: transform 0.12s, box-shadow 0.12s;
}
.module-carte:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--ombre-forte); border-color: #c7d2fe; }
.module-ico {
  font-size: 26px; width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--bleu-clair); border-radius: 12px;
}
.module-carte h3 { margin: 0 0 3px; font-size: 17px; }
.module-carte p { margin: 0; color: var(--texte-doux); font-size: 14px; }
.module-fleche { margin-left: auto; font-size: 22px; color: var(--bleu); flex-shrink: 0; }

.badge {
  display: inline-block; margin-top: 8px; font-size: 11.5px; font-weight: 600;
  background: var(--vert); color: #fff; padding: 2px 9px; border-radius: 999px;
}
.badge-doux { background: #e0e7ff; color: var(--bleu-fonce); }

/* ── Recherche réglementaire ── */
.barre-recherche { position: relative; margin-bottom: 12px; }
.champ-recherche {
  width: 100%; padding: 14px 16px 14px 44px; font-size: 16px; border: 2px solid var(--bord);
  border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 14px center;
}
.champ-recherche:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12); }

.suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--bord);
  border-radius: 12px; box-shadow: var(--ombre-forte); max-height: 320px; overflow-y: auto;
}
.suggestion {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  cursor: pointer; font-size: 14.5px;
}
.suggestion:hover, .suggestion.actif { background: var(--bleu-clair); }
.sugg-ico { opacity: 0.6; }

.puces { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.puce {
  border: 1px solid var(--bord); background: #fff; color: var(--texte); padding: 7px 14px;
  border-radius: 999px; font-size: 13.5px; cursor: pointer;
}
.puce:hover { border-color: var(--bleu); }
.puce.active { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.compteur { color: var(--texte-doux); font-size: 13.5px; margin: 0 0 14px; }

/* ── Recherche officielle Légifrance ── */
.barre-officielle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.btn-officiel { background: var(--bleu-fonce); color: #fff; border-color: var(--bleu-fonce); }
.btn-officiel:hover { background: #172554; color: #fff; }
.legifrance-zone:not(:empty) { margin-bottom: 16px; padding-bottom: 4px; }
.legifrance-titre { font-weight: 700; color: var(--bleu-fonce); margin: 6px 0 10px; }
.resultat-officiel { border-left: 4px solid var(--bleu-fonce); }
.tag-officiel { background: #065f46; }
.resultat-code { color: var(--texte-doux); font-size: 13px; margin-bottom: 6px; }
.btn-juris { background: #92400e; color: #fff; border-color: #92400e; }
.btn-juris:hover { background: #78350f; color: #fff; }
.resultat-juris-officiel { border-left: 4px solid #92400e; }
.tag-juris { background: #92400e; }
.diagnostic { margin-top: 10px; font-size: 12px; color: var(--texte-doux); }
.diagnostic summary { cursor: pointer; }
.diagnostic-pre { white-space: pre-wrap; word-break: break-all; background: #f3f4f6; padding: 10px; border-radius: 8px; max-height: 240px; overflow: auto; }

.resultat-entete { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tag-source {
  font-size: 11.5px; font-weight: 600; background: var(--bleu-fonce); color: #fff;
  padding: 3px 10px; border-radius: 6px;
}
.resultat-ref { font-weight: 700; color: var(--bleu-fonce); }
.resultat-titre { margin: 4px 0 12px; font-size: 17px; }
.resultat-bloc { margin-bottom: 12px; }
.resultat-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--texte-doux);
  font-weight: 700; margin-bottom: 3px;
}
.resultat-texte { font-size: 14.5px; }
.resultat-explication { font-size: 14.5px; background: var(--bleu-clair); padding: 12px 14px; border-radius: 8px; border-left: 3px solid var(--bleu); }
.resultat-lien { font-size: 13.5px; font-weight: 600; }
mark { background: #fde68a; padding: 0 2px; border-radius: 3px; }

/* ── Jurisprudence ── */
.resultat-juris { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; }
.juris-arret { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-bottom: 1px dashed #fcd34d; }
.juris-arret:last-of-type { border-bottom: 0; }
.juris-ref { font-weight: 700; color: #92400e; font-size: 13.5px; }
.juris-portee { font-size: 13.5px; color: var(--texte); }
.juris-liens { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.juris-lien { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #fcd34d; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #92400e; }
.juris-lien:hover { text-decoration: none; background: #fffbeb; border-color: #f59e0b; }

/* ── Recherche web (repli hors base locale) ── */
.web-panel { margin-top: 16px; border: 1px dashed #c7d2fe; background: #f5f8ff; border-radius: 12px; padding: 14px 16px; text-align: left; }
.web-panel-fort { border-style: solid; border-color: var(--bleu); background: var(--bleu-clair); }
.web-panel-titre { font-weight: 700; color: var(--bleu-fonce); margin-bottom: 2px; }
.web-liens { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.web-lien { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--bord); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--bleu-fonce); }
.web-lien:hover { text-decoration: none; border-color: var(--bleu); background: var(--bleu-clair); }

/* ── Accidents : grilles méthodes ── */
.methodes-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.methode-carte {
  display: block; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--radius);
  padding: 18px; color: var(--texte); box-shadow: var(--ombre); transition: transform 0.12s, box-shadow 0.12s;
}
.methode-carte:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--ombre-forte); border-color: #c7d2fe; }
.methode-carte h3 { margin: 0 0 6px; font-size: 16px; }
.methode-carte p { margin: 0 0 10px; color: var(--texte-doux); font-size: 13.5px; }

.lien-retour { font-size: 14px; font-weight: 600; display: inline-block; margin-bottom: 10px; }
.methode-entete { margin-bottom: 16px; }

/* ── Outils interactifs ── */
.outil { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--radius); padding: 22px; box-shadow: var(--ombre); margin-top: 8px; }
.outil-entete h2 { margin: 0 0 4px; }
.outil-entete p { margin: 0 0 16px; color: var(--texte-doux); font-size: 14px; }

.label { display: block; font-size: 13px; font-weight: 600; color: var(--texte); margin: 10px 0 5px; }
.champ {
  width: 100%; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 9px; font-size: 14.5px;
  font-family: inherit; background: #fff;
}
.champ:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1); }
.champ-mini { padding: 7px 10px; font-size: 13.5px; }
.champ-zone { resize: vertical; }
.zone-texte {
  width: 100%; padding: 12px 14px; border: 1px solid var(--bord); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; resize: vertical;
}
.zone-texte:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.btn {
  border: 1px solid var(--bord); background: #fff; color: var(--texte); padding: 10px 16px;
  border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn:hover { border-color: var(--bleu); background: var(--bleu-clair); text-decoration: none; }
.btn-primaire { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.btn-primaire:hover { background: var(--bleu-fonce); color: #fff; }
.btn-discret { color: #b91c1c; }
.btn-discret:hover { background: #fef2f2; border-color: #fecaca; }
.btn-mini { padding: 6px 12px; font-size: 13px; }

/* ── Arbre des causes ── */
.arbre-legende { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 8px 0 14px; font-size: 13px; color: var(--texte-doux); }
.pastille { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.pastille-fait { background: #fecaca; border: 1px solid #f87171; }
.pastille-cause { background: #dbeafe; border: 1px solid #93c5fd; }
.lg-aide { font-style: italic; }

.arbre-sortie { overflow-x: auto; padding: 6px 2px 2px; }
.arbre-grille { display: flex; gap: 28px; align-items: flex-start; min-width: min-content; padding-bottom: 8px; }
.arbre-col { display: flex; flex-direction: column; gap: 12px; min-width: 180px; position: relative; }
.arbre-col-titre { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--texte-doux); font-weight: 700; text-align: center; }
.arbre-noeud {
  background: #dbeafe; border: 1px solid #93c5fd; border-radius: 9px; padding: 10px 12px;
  font-size: 13.5px; cursor: pointer; position: relative; transition: transform 0.1s;
}
.arbre-noeud:hover { transform: scale(1.02); box-shadow: var(--ombre); }
.noeud-ultime { background: #fee2e2; border: 2px solid #ef4444; font-weight: 600; }
.noeud-marque { font-size: 10px; font-weight: 700; color: #b91c1c; letter-spacing: 0.05em; margin-top: 4px; }
/* Connecteurs entre colonnes */
.arbre-col:not(:last-child)::after {
  content: ""; position: absolute; top: 40px; right: -28px; width: 28px; border-top: 2px solid #cbd5e1;
}
.arbre-note { margin-top: 14px; }

/* ── 5 Pourquoi ── */
.pourquoi-liste { display: flex; flex-direction: column; gap: 10px; }
.pourquoi-ligne { display: flex; align-items: center; gap: 12px; }
.pourquoi-num { flex-shrink: 0; width: 100px; font-size: 13px; font-weight: 600; color: var(--bleu-fonce); }
.synthese { margin-top: 18px; background: var(--bleu-clair); border-radius: 10px; padding: 16px 18px; }
.chaine { margin: 8px 0; }
.chaine li { margin: 4px 0; }

/* ── Ishikawa / niveaux ── */
.ishikawa-grille, .niveaux-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 14px; }
.ishikawa-col, .niveau-bloc { background: var(--fond); border: 1px solid var(--bord); border-radius: 10px; padding: 12px; }
.ishikawa-titre, .niveau-titre { font-weight: 700; color: var(--bleu-fonce); margin-bottom: 4px; }
.ishikawa-aide { font-size: 12px; color: var(--texte-doux); margin: 0 0 10px; }
.ishikawa-causes, .niveau-causes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ishikawa-cause { display: flex; gap: 6px; align-items: center; }
.btn-supprimer {
  flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--bord); background: #fff;
  border-radius: 7px; cursor: pointer; color: #b91c1c; font-size: 18px; line-height: 1;
}
.btn-supprimer:hover { background: #fef2f2; border-color: #fecaca; }

/* ── Arbre graphique (éditeur) ── */
.arbre-editeur { overflow: auto; border: 1px solid var(--bord); border-radius: 10px; background:
  radial-gradient(circle, #e8eef6 1px, transparent 1px) 0 0 / 22px 22px, #fbfdff; padding: 10px; }
.arbre-scene { position: relative; min-width: 100%; }
.arbre-liens { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
.arbre-lien { fill: none; stroke: #94a3b8; stroke-width: 2; }
.gnoeud {
  position: absolute; background: #dbeafe; border: 1px solid #93c5fd; border-radius: 10px;
  padding: 8px 10px; box-sizing: border-box; cursor: pointer; box-shadow: var(--ombre);
  display: flex; flex-direction: column; gap: 4px; transition: transform 0.1s, box-shadow 0.1s;
}
.gnoeud:hover { transform: translateY(-1px); box-shadow: var(--ombre-forte); border-color: var(--bleu); }
.gnoeud-cause { background: #dbeafe; border-color: #93c5fd; }
.gnoeud-fait { background: #e0f2fe; border-color: #7dd3fc; }
.gnoeud-ultime { background: #fee2e2; border: 2px solid #ef4444; }
.gnoeud-texte { font-size: 13px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.gnoeud-tag { font-size: 9.5px; font-weight: 800; color: #b91c1c; letter-spacing: 0.05em; }
.gnoeud-pieds { display: flex; gap: 8px; font-size: 11px; color: var(--texte-doux); margin-top: auto; }
.gnoeud-ico { display: inline-flex; align-items: center; gap: 2px; }

.btn-ia { background: linear-gradient(120deg, #7c3aed, #2563eb); color: #fff; border-color: transparent; }
.btn-ia:hover { background: linear-gradient(120deg, #6d28d9, #1d4ed8); color: #fff; }
.etat-ia { display: inline-block; font-size: 13.5px; color: var(--bleu-fonce); margin: 4px 0; font-weight: 600; }

/* ── Modale ── */
.modale-fond { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modale { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--ombre-forte); }
.modale-entete { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--bord); position: sticky; top: 0; background: #fff; }
.modale-entete h3 { margin: 0; }
.modale-x { background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--texte-doux); line-height: 1; }
.modale-corps { padding: 16px 20px; }
.modale-pied { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--bord); position: sticky; bottom: 0; background: #fff; }
.radios { display: flex; gap: 16px; }
.radio { font-size: 14px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ant-liste { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow-y: auto; border: 1px solid var(--bord); border-radius: 8px; padding: 8px; }
.ant-item { font-size: 13.5px; display: flex; gap: 6px; align-items: flex-start; cursor: pointer; }
.photo-item { position: relative; }
.photo-item .btn-supprimer { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; font-size: 14px; }

/* ── Analyses enregistrées ── */
.analyses-liste { display: flex; flex-direction: column; gap: 8px; }
.analyse-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--bord); border-radius: 9px; padding: 10px 12px; }
.analyse-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Visites ── */
.entete-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.visites-liste { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.visite-carte {
  display: flex; align-items: center; gap: 14px; background: var(--carte); border: 1px solid var(--bord);
  border-radius: var(--radius); padding: 16px 18px; color: var(--texte); box-shadow: var(--ombre);
}
.visite-carte:hover { text-decoration: none; border-color: #c7d2fe; box-shadow: var(--ombre-forte); }
.visite-carte-corps { flex: 1; }
.visite-carte h3 { margin: 0 0 4px; font-size: 16px; }
.visite-meta { margin: 0; color: var(--texte-doux); font-size: 13.5px; }
.visite-meta2 { margin: 3px 0; font-size: 13px; color: var(--texte-doux); }

.form-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-champ { display: flex; flex-direction: column; }

.itamami-intro { margin: 4px 0 14px; font-size: 14px; }
.itamami { display: flex; flex-direction: column; gap: 16px; }
.axe {
  background: var(--carte); border: 1px solid var(--bord); border-left: 5px solid var(--axe-couleur, var(--bleu));
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--ombre);
}
.axe-entete { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.axe-lettre {
  flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  background: var(--axe-couleur, var(--bleu)); color: #fff; font-weight: 800; font-size: 17px;
}
.axe-titre { margin: 0; font-size: 17px; }
.axe-desc { margin: 0; font-size: 13.5px; color: var(--texte-doux); }
.axe-points-wrap { margin: 6px 0 12px; }
.axe-points-wrap summary { cursor: pointer; font-size: 13.5px; color: var(--bleu); font-weight: 600; }
.axe-points { margin: 8px 0 0; font-size: 13.5px; color: var(--texte-doux); }

.axe-observations { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; }
.observation { position: relative; background: var(--fond); border: 1px solid var(--bord); border-radius: 10px; padding: 14px 16px; }
.btn-supprimer-obs { position: absolute; top: 10px; right: 10px; }
.obs-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }

.risque-choix { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.risque-puce { border: 1.5px solid var(--c); background: #fff; color: var(--c); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; }
.risque-puce.active { background: var(--c); color: #fff; }

.photo-zone { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.photo-apercu { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.photo-vignette { max-width: 160px; max-height: 130px; border-radius: 8px; border: 1px solid var(--bord); }

.actions-sticky { position: sticky; bottom: 0; background: linear-gradient(to top, var(--fond) 60%, transparent); padding: 14px 0; margin-top: 20px; }
.flash { background: var(--vert); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; display: inline-block; margin-bottom: 10px; }

/* ── Connexion (login formateur) ── */
body.mode-login .entete,
body.mode-login .barre-laterale,
body.mode-login .voile { display: none !important; }
body.mode-login .contenu { padding: 0; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu)); }
.login-carte { background: #fff; border-radius: 16px; box-shadow: var(--ombre-forte);
  padding: 32px 30px; width: min(400px, 100%); text-align: center; }
.login-logo { font-size: 44px; }
.login-titre { margin: 6px 0 2px; font-size: 24px; }
.login-sous { color: var(--texte-doux); margin: 0 0 20px; font-size: 14.5px; }
.login-form { text-align: left; display: flex; flex-direction: column; }
.login-form .label { margin-top: 12px; }
.login-btn { margin-top: 18px; width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.login-erreur { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px;
  padding: 8px 12px; font-size: 13.5px; margin: 12px 0 0; }
.login-aide { margin-top: 16px; font-size: 12.5px; }
.pied-user { display: block; margin-bottom: 8px; font-weight: 600; color: var(--texte); word-break: break-all; }
.btn-deco { width: 100%; justify-content: center; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .menu-bascule { display: block; }
  .barre-laterale {
    position: fixed; left: 0; top: var(--hauteur-entete); height: calc(100vh - var(--hauteur-entete));
    transform: translateX(-100%); transition: transform 0.2s; z-index: 35; box-shadow: var(--ombre-forte);
  }
  .barre-laterale.ouverte { transform: none; }
  .contenu { padding: 20px 16px 80px; }
  .form-grille, .obs-deux { grid-template-columns: 1fr; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 23px; }
}

/* ── Impression ── */
@media print {
  .entete, .barre-laterale, .actions, .actions-sticky, .menu-bascule { display: none !important; }
  .contenu { padding: 0; }
}
