/* ==========================================================================
   DM-TN Studio 2.0 — styles d'application (pages et modules)
   ========================================================================== */

/* --- Connexion — Login Pro 2.0 ----------------------------------------- */
.lp-ecran {
  --lp-rouge: #870000;
  --lp-rouge-fonce: #6b0000;
  --lp-bordeaux: #5a0808;
  --lp-noir: #1a1a1a;
  --lp-creme: #f7f4ef;
  --lp-gris: #8c8c8c;
  --lp-vert: #10b981;
  flex: 1 1 auto; width: 100%;
  display: grid; grid-template-columns: 52% 48%;
  min-height: 100vh; background: #fff;
  font-family: "DM Sans", "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--lp-noir);
}
@media (min-width: 1360px) { .lp-ecran { grid-template-columns: 54% 46%; } }
.lp-ecran *, .lp-ecran *::before, .lp-ecran *::after { box-sizing: border-box; }

/* --- Panneau visuel ----------------------------------------------------- */
.lp-visuel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(16px, 2.4vh, 26px);
  padding: clamp(24px, 3vw, 48px) clamp(26px, 4vw, 64px);
  color: #fff;
  background: linear-gradient(138deg, #1a1a1a 0%, #260606 55%, #5a0808 100%);
}
.lp-sousgrille {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 12px 12px;
}
.lp-grille {
  position: absolute; inset: -12%; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(120% 95% at 55% 40%, #000 20%, transparent 82%);
  mask-image: radial-gradient(120% 95% at 55% 40%, #000 20%, transparent 82%);
  animation: lpDenivele 22s linear infinite;
}
@keyframes lpDenivele { to { transform: translate3d(48px, 48px, 0); } }

.lp-halo {
  position: absolute; z-index: 0; width: 720px; height: 720px; left: -220px; top: -200px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(135, 0, 0, 0.34) 0%, rgba(135, 0, 0, 0) 62%);
  animation: lpRespiration 9s ease-in-out infinite;
}
@keyframes lpRespiration {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}
.lp-radar { position: absolute; z-index: 0; right: -140px; bottom: -160px; width: 460px; height: 460px; pointer-events: none; }
.lp-radar span {
  position: absolute; inset: 0; margin: auto;
  width: 100%; height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 50%;
  animation: lpOnde 7s ease-out infinite;
}
.lp-radar span:nth-child(2) { width: 68%; height: 68%; animation-delay: 2.3s; }
.lp-radar span:nth-child(3) { width: 40%; height: 40%; animation-delay: 4.6s; }
@keyframes lpOnde {
  0% { transform: scale(0.62); opacity: 0.5; }
  70% { opacity: 0.12; }
  100% { transform: scale(1.12); opacity: 0; }
}
.lp-particules { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.lp-particules i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #ffd9d9; opacity: 0.3;
  animation: lpFlotte 13s ease-in-out infinite;
}
.lp-particules i:nth-child(1) { left: 9%; top: 62%; animation-delay: 0s; }
.lp-particules i:nth-child(2) { left: 18%; top: 34%; animation-delay: 1.4s; animation-duration: 10s; }
.lp-particules i:nth-child(3) { left: 28%; top: 78%; animation-delay: 2.6s; }
.lp-particules i:nth-child(4) { left: 37%; top: 18%; animation-delay: 3.8s; animation-duration: 15s; }
.lp-particules i:nth-child(5) { left: 46%; top: 55%; animation-delay: 0.8s; }
.lp-particules i:nth-child(6) { left: 55%; top: 86%; animation-delay: 5s; animation-duration: 11s; }
.lp-particules i:nth-child(7) { left: 63%; top: 28%; animation-delay: 1.9s; }
.lp-particules i:nth-child(8) { left: 71%; top: 70%; animation-delay: 4.4s; animation-duration: 14s; }
.lp-particules i:nth-child(9) { left: 80%; top: 44%; animation-delay: 2.2s; }
.lp-particules i:nth-child(10) { left: 88%; top: 16%; animation-delay: 6s; animation-duration: 12s; }
.lp-particules i:nth-child(11) { left: 13%; top: 12%; animation-delay: 3.1s; }
.lp-particules i:nth-child(12) { left: 92%; top: 74%; animation-delay: 4.9s; }
@keyframes lpFlotte {
  0%, 100% { transform: translateY(0); opacity: 0.16; }
  50% { transform: translateY(-26px); opacity: 0.6; }
}

/* En-tête du panneau visuel */
.lp-visuel__haut { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.lp-badge {
  display: inline-flex; align-items: center; gap: 11px; padding: 8px 14px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}
.lp-badge__point { position: relative; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #d91616; }
.lp-badge__point::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid rgba(217, 22, 22, 0.55);
  animation: lpPing 2.4s ease-out infinite;
}
@keyframes lpPing { 0% { transform: scale(0.6); opacity: 0.9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
.lp-badge b { font-family: "Manrope", "Segoe UI", sans-serif; font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.lp-badge i { font-style: normal; color: rgba(255, 255, 255, 0.3); }
.lp-badge > span:last-child { font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(247, 244, 239, 0.75); }
.lp-version {
  padding: 5px 10px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em; color: rgba(247, 244, 239, 0.7);
  white-space: nowrap;
}

/* Plan technique flottant */
.lp-illustration { position: relative; z-index: 2; width: 100%; max-width: 500px; margin: 0 auto; }
.lp-illustration__flottant { position: relative; animation: lpBerce 7s ease-in-out infinite; }
@keyframes lpBerce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.lp-plan {
  position: relative; padding: 17px 17px 14px;
  border-radius: 16px; background: rgba(26, 26, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}
.lp-plan__barre {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px; letter-spacing: 0.03em; text-transform: uppercase;
  color: #8c8c8c;
}
.lp-plan__barre b { font-weight: 500; color: rgba(247, 244, 239, 0.8); white-space: nowrap; }
.lp-plan__svg { display: block; width: 100%; height: auto; }
.lp-plan__trace { stroke-dasharray: 6 6; animation: lpTrace 2.4s linear infinite; }
@keyframes lpTrace { to { stroke-dashoffset: -24; } }

.lp-carte {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; border-radius: 12px;
  background: rgba(26, 26, 26, 0.88); border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}
.lp-carte--iso { top: -38px; left: -12px; animation: lpBalance 5.5s ease-in-out infinite; }
.lp-carte--atelier { bottom: -16px; right: -10px; animation: lpBalance 6.2s ease-in-out 1.2s infinite; }
@keyframes lpBalance { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.lp-carte__icone {
  width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 8px; background: rgba(135, 0, 0, 0.32); border: 1px solid #870000; color: #f7f4ef;
}
.lp-carte__point { width: 7px; height: 7px; flex: 0 0 auto; margin: 0 3px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16); }
.lp-carte__texte { display: flex; flex-direction: column; gap: 2px; }
.lp-carte__texte small { font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #8c8c8c; }
.lp-carte__texte b { font-family: "Manrope", "Segoe UI", sans-serif; font-size: 11.5px; font-weight: 700; color: #fff; white-space: nowrap; }

/* Éditorial */
.lp-edito { position: relative; z-index: 3; max-width: 560px; }
.lp-edito h1 {
  margin: 0 0 12px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(29px, 2.9vw, 38px); font-weight: 800; line-height: 1.18; letter-spacing: -0.03em;
}
.lp-edito h1 span { color: #f7f4ef; }
.lp-edito p { margin: 0 0 24px; max-width: 460px; font-size: 14px; line-height: 1.65; color: rgba(247, 244, 239, 0.8); }
.lp-telemetrie {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap;
  padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11.5px; color: rgba(247, 244, 239, 0.65);
}
.lp-telemetrie__statut { display: inline-flex; align-items: center; gap: 8px; }
.lp-telemetrie__statut i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14); }
.lp-telemetrie__reseaux { display: inline-flex; align-items: center; gap: 9px; }
.lp-telemetrie__reseaux i { font-style: normal; color: rgba(255, 255, 255, 0.3); }

/* --- Apparition en cascade --------------------------------------------- */
.lp-apparait { animation: lpMonte 0.65s cubic-bezier(0.22, 0.8, 0.22, 1) both; }
.lp-apparait.d1 { animation-delay: 0.05s; }
.lp-apparait.d2 { animation-delay: 0.14s; }
.lp-apparait.d3 { animation-delay: 0.22s; }
.lp-apparait.d4 { animation-delay: 0.3s; }
.lp-apparait.d5 { animation-delay: 0.38s; }
@keyframes lpMonte {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Panneau formulaire ------------------------------------------------- */
.lp-panneau {
  position: relative; display: flex; flex-direction: column; min-height: 100vh;
  padding: clamp(22px, 3vw, 44px) clamp(22px, 4.4vw, 64px) clamp(16px, 2.4vh, 26px);
  background: #fff;
}
.lp-panneau__haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.lp-panneau__acces { font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lp-gris); }
.lp-outils { display: flex; align-items: center; gap: 8px; }
.lp-bascule {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 10px;
  background: #f7f4ef; color: #1a1a1a;
  font-family: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.lp-bascule:hover { background: #efece6; }
.lp-bascule__point { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--lp-rouge); transition: background 0.18s; }
.lp-bascule__point.est-pause { background: #b8b2aa; }
.lp-outil {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 10px;
  background: #f7f4ef; color: #1a1a1a; cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.lp-outil:hover { background: #efece6; color: var(--lp-rouge); }

.lp-panneau__corps { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 26px 0 18px; }
.lp-forme { width: 100%; max-width: 420px; }

/* Logo officiel */
.lp-marque { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.lp-marque__logo { height: 36px; width: auto; max-width: 138px; display: block; }
.lp-marque__separateur { width: 1px; height: 36px; flex: 0 0 auto; background: rgba(0, 0, 0, 0.1); }
.lp-marque__texte { display: flex; flex-direction: column; }
.lp-marque__texte b {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em; line-height: 1;
  color: var(--lp-noir);
}
.lp-marque__texte small { margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lp-rouge); }

.lp-titre {
  margin: 0 0 7px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(25px, 2.2vw, 28px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.12;
  color: var(--lp-noir);
}
.lp-sous-titre { margin: 0 0 28px; font-size: 14px; line-height: 1.6; color: var(--lp-gris); }

.lp-champs { display: flex; flex-direction: column; gap: 16px; }
.lp-champ { display: block; }
.lp-champ__label {
  display: block; margin-bottom: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(26, 26, 26, 0.8);
}
.lp-champ__boite {
  position: relative; display: flex; align-items: center; height: 52px;
  border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 12px;
  background: rgba(247, 244, 239, 0.6);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.lp-champ__boite:focus-within { border-color: var(--lp-rouge); box-shadow: 0 0 0 3.5px rgba(135, 0, 0, 0.12); }
.lp-champ__icone { display: flex; flex: 0 0 auto; padding-left: 15px; color: #a49d93; }
.lp-input {
  flex: 1 1 auto; min-width: 0; height: 100%;
  border: 0; background: transparent; padding: 0 14px;
  font-family: inherit; font-size: 14.5px; color: var(--lp-noir); outline: none;
}
.lp-input::placeholder { color: rgba(140, 140, 140, 0.7); }
.lp-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #f7f4ef inset;
  -webkit-text-fill-color: var(--lp-noir);
}
.lp-oeil {
  flex: 0 0 auto; width: 42px; height: 42px; margin-right: 5px;
  display: grid; place-items: center;
  border: 0; border-radius: 9px; background: none; color: #8c867d; cursor: pointer;
  transition: color 0.16s, background 0.16s;
}
.lp-oeil:hover { color: var(--lp-rouge); background: rgba(135, 0, 0, 0.06); }

.lp-champ__etat { display: none; flex: 0 0 auto; padding-right: 14px; }
.lp-champ.est-valide .lp-champ__boite { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.09); }
.lp-champ.est-valide .lp-champ__etat { display: flex; color: #0e9f6e; }
.lp-champ.est-invalide .lp-champ__boite { border-color: #d8a6a6; }
.lp-champ.est-invalide .lp-champ__etat { display: flex; color: #b25b5b; }
.lp-champ__aide { display: block; margin-top: 6px; min-height: 14px; font-size: 11px; line-height: 1.3; color: #9a948b; }
.lp-champ.est-invalide .lp-champ__aide { color: #a34a4a; }

.lp-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 22px; }
.lp-case {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: rgba(26, 26, 26, 0.8); cursor: pointer; user-select: none;
}
.lp-case input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lp-case__boite {
  width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 5px; background: #f7f4ef; color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.lp-case input:checked + .lp-case__boite { background: var(--lp-rouge); border-color: var(--lp-rouge); color: #fff; }
.lp-case input:focus-visible + .lp-case__boite { outline: 2px solid rgba(135, 0, 0, 0.45); outline-offset: 2px; }
.lp-lien {
  border: 0; background: none; padding: 0;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--lp-rouge); cursor: pointer;
}
.lp-lien:hover { color: var(--lp-rouge-fonce); text-decoration: underline; }

.lp-alerte {
  display: flex; align-items: flex-start; gap: 9px;
  margin-bottom: 16px; padding: 11px 13px;
  border: 1px solid rgba(135, 0, 0, 0.35); border-radius: 11px;
  background: rgba(135, 0, 0, 0.1); color: var(--lp-rouge);
  font-size: 12px; line-height: 1.5;
}
.lp-alerte[hidden] { display: none; }
.lp-alerte svg { flex: 0 0 auto; margin-top: 1px; }

.lp-submit {
  position: relative; overflow: hidden;
  width: 100%; height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: 12px;
  background: var(--lp-rouge); color: #fff;
  font-family: "Manrope", "DM Sans", sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(135, 0, 0, 0.25);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.lp-submit::after {
  content: ""; position: absolute; top: -60%; left: -40%;
  width: 22%; height: 220%; background: rgba(255, 255, 255, 0.22);
  transform: rotate(24deg); transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-submit:hover:not(:disabled) { background: #9e0505; box-shadow: 0 16px 32px rgba(135, 0, 0, 0.3); }
.lp-submit:hover:not(:disabled)::after { left: 140%; }
.lp-submit:active:not(:disabled) { transform: scale(0.99); }
.lp-submit:disabled { cursor: progress; }
.lp-submit__fleche { display: flex; opacity: 0.92; }
.lp-submit__spinner {
  display: none; width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%;
  animation: lpTour 0.7s linear infinite;
}
.lp-submit__icone { display: none; }
@keyframes lpTour { to { transform: rotate(360deg); } }
.lp-submit.est-chargement .lp-submit__spinner { display: block; }
.lp-submit.est-chargement .lp-submit__fleche { display: none; }
.lp-submit.est-succes { background: var(--lp-vert); box-shadow: 0 12px 26px rgba(16, 185, 129, 0.28); cursor: default; }
.lp-submit.est-succes .lp-submit__spinner, .lp-submit.est-succes .lp-submit__fleche { display: none; }
.lp-submit.est-succes .lp-submit__icone { display: flex; }
.lp-submit--contour { background: none; color: var(--lp-rouge); border: 1px solid #e2c9c9; box-shadow: none; }
.lp-submit--contour::after { display: none; }
.lp-submit--contour:hover:not(:disabled) { background: #fbf3f3; color: var(--lp-rouge-fonce); box-shadow: none; transform: none; }

.lp-securite {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 18px; font-size: 11.5px; color: var(--lp-gris); text-align: center;
}
.lp-securite svg { flex: 0 0 auto; color: var(--lp-rouge); }

.lp-forme.lp-secousse { animation: lpSecousse 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes lpSecousse {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.lp-pied {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 11px; color: var(--lp-gris);
}
.lp-ssl { display: inline-flex; align-items: center; gap: 6px; }
.lp-ssl svg { color: var(--lp-rouge); }

/* --- Récupération d'accès ---------------------------------------------- */
.lp-retour {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 22px; padding: 0; border: 0; background: none;
  font-family: inherit; font-size: 12px; font-weight: 600; color: #8c867d; cursor: pointer;
}
.lp-retour:hover { color: var(--lp-rouge); }
.lp-note {
  display: flex; gap: 9px;
  margin: 20px 0 24px; padding: 13px 14px;
  border: 1px solid #ece5da; border-radius: 11px;
  background: #faf7f2; font-size: 12px; line-height: 1.6; color: #5f5a54;
}
.lp-note svg { flex: 0 0 auto; margin-top: 1px; color: #8c867d; }
.lp-note--compact { margin: 0 0 18px; }
.lp-confirme__rond {
  width: 52px; height: 52px; display: grid; place-items: center;
  margin-bottom: 20px; border-radius: 50%;
  background: #e7f7f0; color: #0e9f6e;
}
.lp-confirme .lp-titre { font-size: 26px; }

/* --- Mode sombre ------------------------------------------------------- */
.lp-ecran[data-theme="sombre"] { background: #141414; color: #f2ede6; }
.lp-ecran[data-theme="sombre"] .lp-visuel {
  background: linear-gradient(138deg, #141414 0%, #1d1012 55%, #4a0a0a 100%);
}
.lp-ecran[data-theme="sombre"] .lp-panneau { background: #1a1a1a; }
.lp-ecran[data-theme="sombre"] .lp-panneau__acces { color: #8b847b; }
.lp-ecran[data-theme="sombre"] .lp-bascule,
.lp-ecran[data-theme="sombre"] .lp-outil { background: #242424; border-color: rgba(255, 255, 255, 0.1); color: #f7f4ef; }
.lp-ecran[data-theme="sombre"] .lp-bascule:hover,
.lp-ecran[data-theme="sombre"] .lp-outil:hover { background: #2e2e2e; }
.lp-ecran[data-theme="sombre"] .lp-bascule__point { background: #e04f4f; }
.lp-ecran[data-theme="sombre"] .lp-bascule__point.est-pause { background: #6f6961; }
.lp-ecran[data-theme="sombre"] .lp-marque__logo { filter: brightness(1.45) saturate(1.08); }
.lp-ecran[data-theme="sombre"] .lp-marque__separateur { background: rgba(255, 255, 255, 0.15); }
.lp-ecran[data-theme="sombre"] .lp-marque__texte b { color: #f7f4ef; }
.lp-ecran[data-theme="sombre"] .lp-marque__texte small { color: #e04f4f; }
.lp-ecran[data-theme="sombre"] .lp-titre { color: #f7f4ef; }
.lp-ecran[data-theme="sombre"] .lp-sous-titre { color: #a29b92; }
.lp-ecran[data-theme="sombre"] .lp-champ__label { color: rgba(247, 244, 239, 0.8); }
.lp-ecran[data-theme="sombre"] .lp-champ__boite { background: #242424; border-color: rgba(255, 255, 255, 0.15); }
.lp-ecran[data-theme="sombre"] .lp-champ__boite:focus-within { border-color: #b30909; box-shadow: 0 0 0 3.5px rgba(135, 0, 0, 0.28); }
.lp-ecran[data-theme="sombre"] .lp-input { color: #f7f4ef; }
.lp-ecran[data-theme="sombre"] .lp-input::placeholder { color: #8c867d; }
.lp-ecran[data-theme="sombre"] .lp-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #242424 inset;
  -webkit-text-fill-color: #f7f4ef;
}
.lp-ecran[data-theme="sombre"] .lp-champ__icone,
.lp-ecran[data-theme="sombre"] .lp-oeil { color: #8f887f; }
.lp-ecran[data-theme="sombre"] .lp-oeil:hover { background: #2a2222; color: #e2a5ae; }
.lp-ecran[data-theme="sombre"] .lp-champ__aide { color: #8b847b; }
.lp-ecran[data-theme="sombre"] .lp-case { color: #c9c2b9; }
.lp-ecran[data-theme="sombre"] .lp-case__boite { background: #242424; border-color: rgba(255, 255, 255, 0.25); }
.lp-ecran[data-theme="sombre"] .lp-lien { color: #f87171; }
.lp-ecran[data-theme="sombre"] .lp-alerte { background: rgba(135, 0, 0, 0.25); border-color: rgba(135, 0, 0, 0.35); color: #fca5a5; }
.lp-ecran[data-theme="sombre"] .lp-note { background: #191919; border-color: #35302b; color: #b9b2a8; }
.lp-ecran[data-theme="sombre"] .lp-securite { color: #8c8c8c; }
.lp-ecran[data-theme="sombre"] .lp-securite svg { color: #e04f4f; }
.lp-ecran[data-theme="sombre"] .lp-pied { border-top-color: rgba(255, 255, 255, 0.05); color: #8c8c8c; }
.lp-ecran[data-theme="sombre"] .lp-ssl svg { color: #e04f4f; }
.lp-ecran[data-theme="sombre"] .lp-submit--contour { color: #e2a5ae; border-color: #4d2a2a; }
.lp-ecran[data-theme="sombre"] .lp-submit--contour:hover:not(:disabled) { background: #2a1c1c; }
.lp-ecran[data-theme="sombre"] .lp-confirme__rond { background: #123025; }
.lp-ecran[data-theme="sombre"] .lp-retour { color: #a29b92; }
.lp-ecran[data-theme="sombre"] .lp-retour:hover { color: #f7f4ef; }

/* --- Animations réduites (toggle ou préférence système) ---------------- */
.lp-ecran[data-anim="reduit"] *,
.lp-ecran[data-anim="reduit"] *::before,
.lp-ecran[data-anim="reduit"] *::after {
  animation: none !important;
  transition: none !important;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1240px) {
  .lp-edito h1 { font-size: clamp(27px, 2.8vw, 34px); }
  .lp-illustration { max-width: 430px; }
  .lp-carte { padding: 8px 11px; }
  .lp-carte__texte b { font-size: 10.5px; }
}
@media (max-width: 1024px) {
  .lp-ecran { grid-template-columns: 46% 54%; }
  .lp-visuel { padding: 24px 26px; }
  .lp-illustration { max-width: 360px; }
  .lp-carte--iso { left: -6px; }
  .lp-carte--atelier { right: -4px; }
  .lp-carte__texte b { font-size: 9.5px; }
  .lp-badge > span:last-child, .lp-badge i { display: none; }
  .lp-edito h1 { font-size: clamp(25px, 3vw, 31px); }
  .lp-edito p { font-size: 13px; }
  .lp-telemetrie { font-size: 10.5px; }
  .lp-telemetrie__reseaux i { display: none; }
}
@media (max-height: 820px) and (min-width: 769px) {
  .lp-visuel { padding-top: 22px; padding-bottom: 22px; }
  .lp-illustration { max-width: 380px; }
  .lp-edito h1 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 8px; }
  .lp-edito p { margin-bottom: 16px; font-size: 13px; }
}
@media (max-height: 700px) and (min-width: 769px) {
  .lp-illustration { display: none; }
}
@media (max-width: 768px) {
  .lp-ecran { grid-template-columns: 1fr; }
  .lp-visuel { display: none; }
  .lp-panneau { min-height: 100vh; padding: 0 clamp(18px, 6vw, 40px) 20px; }
  .lp-panneau__haut {
    margin: 0 calc(-1 * clamp(18px, 6vw, 40px));
    padding: 12px clamp(18px, 6vw, 40px);
    background: linear-gradient(120deg, #1a1a1a 0%, #3a0d10 60%, #5a0808 100%);
  }
  .lp-panneau__acces { color: rgba(255, 255, 255, 0.62); }
  .lp-bascule { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
  .lp-bascule:hover { background: rgba(255, 255, 255, 0.14); }
  .lp-outil { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
  .lp-outil:hover { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
  .lp-panneau__corps { padding: 30px 0 22px; }
  .lp-forme { max-width: 440px; }
  .lp-pied { margin-top: auto; }
}
@media (max-width: 420px) {
  .lp-titre { font-size: 24px; }
  .lp-options { flex-wrap: wrap; }
  .lp-bascule { padding: 0 10px; font-size: 10.5px; }
  .lp-panneau__acces { font-size: 9px; }
  .lp-marque { margin-bottom: 24px; }
  .lp-securite { font-size: 10.5px; }
}

/* --- Tableau CMD -------------------------------------------------------- */
.cmd-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--bordure); background: #fdfbf7;
}
.cmd-toolbar__compteur { font-size: var(--ts-sm); color: var(--gris); }
.cmd-toolbar__compteur strong { color: var(--anthracite); }
.cmd-selection {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; background: var(--bordeaux-clair); border-bottom: 1px solid #ecdbdb;
  font-size: var(--ts-sm); color: var(--bordeaux-fonce);
}
.cmd-pagination { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-top: 1px solid var(--bordure); font-size: var(--ts-sm); color: var(--gris); }
.cmd-pagination .btn { height: 26px; }
.cmd-pagination__taille { display: flex; align-items: center; gap: 5px; }
.cmd-pagination__taille .saisie { height: 26px; width: 70px; padding: 0 22px 0 8px; font-size: var(--ts-xs); }

/* --- Filtres du guide --------------------------------------------------- */
.barre-filtres--guide { flex-direction: column; align-items: stretch; gap: 10px; }
.filtres-entete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filtres-entete__titre {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--ts-sm); font-weight: 700; color: var(--anthracite);
}
.filtres-actifs {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: var(--r-pilule); background: var(--bordeaux-clair); color: var(--bordeaux-fonce);
  font-size: 10.5px; font-weight: 700;
}
.filtres-entete__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filtres-grille {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px; align-items: end;
}
.filtres-grille .champ { min-width: 0; }
.filtres-statuts, .filtres-avances {
  border: 1px solid var(--bordure); border-radius: var(--r-md); background: #fff;
}
.filtres-statuts summary, .filtres-avances summary {
  cursor: pointer; padding: 8px 10px; font-size: var(--ts-sm); font-weight: 650; color: var(--anthracite);
}
.filtres-statuts summary::marker, .filtres-avances summary::marker { color: var(--bordeaux); }
.filtres-statuts__entete { display: flex; gap: 6px; padding: 0 10px 8px; }
.filtres-statuts__liste {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 4px 14px; max-height: 190px; overflow: auto; padding: 0 10px 10px;
}
.filtres-statut { display: flex; align-items: center; gap: 6px; font-size: var(--ts-sm); color: var(--anthracite); }
.filtres-avances { border-style: dashed; }
.filtres-avances .filtres-grille { padding: 0 10px 12px; }

/* --- Sélection multi-niveaux ------------------------------------------- */
.cmd-raccourcis {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 14px; border-bottom: 1px solid var(--bordure); background: #fff;
}
.cmd-raccourcis__legende {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--gris); margin-right: 4px;
}
.tableau--commandes { min-width: 1180px; }
.tableau--commandes th.col-case, .tableau--commandes td.col-case { width: 34px; text-align: center; }
.tableau--commandes td .truncate { max-width: 160px; }
.tableau--commandes td:nth-child(2) { min-width: 230px; }
.cmd-ligne--bloquee td { background: #fdf6f6; }
.cmd-ligne--urgente td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.cmd-ligne--active td:first-child { box-shadow: inset 3px 0 0 var(--attention); }

/* --- Fiche CMD ---------------------------------------------------------- */
.fiche { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 13px; align-items: start; }
.fiche__entete { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fiche__ref { font-family: var(--mono); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.fiche__sous { color: var(--gris); font-size: var(--ts-sm); }
.fiche__etapes { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0 3px; }
.etape {
  display: flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-pilule);
  font-size: 10.5px; font-weight: 650; background: #efece6; color: var(--gris); border: 1px solid transparent;
}
.etape--faite { background: var(--ok-fond); color: var(--ok); }
.etape--courante { background: var(--bordeaux); color: #fff; }
.etape--danger { background: var(--danger-fond); color: var(--danger); }
.fiche__colonne { display: flex; flex-direction: column; gap: 13px; min-width: 0; }

.fichiers-liste { display: flex; flex-direction: column; gap: 6px; }
.fichier {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px;
  border: 1px solid var(--bordure); border-radius: var(--r-sm); background: var(--blanc);
  font-size: var(--ts-sm);
}
.fichier__icone { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: #eeebe5; color: #4a4642; font-size: 9px; font-weight: 800; }
.fichier__icone--ai { background: #fff0e6; color: #b45309; }
.fichier__icone--pdf { background: #fdeaea; color: #b91c1c; }
.fichier__nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fichier__meta { font-size: 10.5px; color: var(--gris); }

/* --- Tableau de production (colonnes) ---------------------------------- */
.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 11px; align-items: start; }
.colonne {
  background: #eeebe5; border-radius: var(--r-md); padding: 9px;
  display: flex; flex-direction: column; gap: 8px; min-height: 120px;
}
.colonne__titre { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: #4a4642; }
.colonne__titre .badge { margin-left: auto; }
.carte-cmd {
  background: var(--blanc); border: 1px solid var(--bordure); border-radius: var(--r-sm);
  padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; cursor: pointer;
  box-shadow: var(--ombre-1); transition: border-color var(--transition), box-shadow var(--transition);
}
.carte-cmd:hover { border-color: var(--bordeaux); box-shadow: var(--ombre-2); }
.carte-cmd__ref { font-family: var(--mono); font-size: 11.5px; font-weight: 700; }
.carte-cmd__client { font-size: 11.5px; color: #4a4642; }
.carte-cmd__pied { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--gris); }

/* --- Calendrier --------------------------------------------------------- */
.calendrier { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendrier__jour-entete { font-size: 9.5px; font-weight: 700; color: var(--gris); text-transform: uppercase; text-align: center; padding-bottom: 3px; }
.calendrier__case {
  min-height: 74px; border: 1px solid var(--bordure); border-radius: var(--r-sm);
  background: var(--blanc); padding: 4px 5px; display: flex; flex-direction: column; gap: 3px;
}
.calendrier__case--hors-mois { background: #fbf9f5; color: #b5aea4; }
.calendrier__case--aujourdhui { border-color: var(--bordeaux); box-shadow: inset 0 0 0 1px var(--bordeaux); }
.calendrier__numero { font-size: 10.5px; font-weight: 700; color: #4a4642; }
.calendrier__event { font-size: 9.5px; padding: 1px 4px; border-radius: 4px; background: var(--bordeaux-clair); color: var(--bordeaux-fonce); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendrier__event--conge { background: var(--ok-fond); color: var(--ok); }
.calendrier__event--tt { background: var(--info-fond); color: var(--info); }
.calendrier__event--echeance { background: var(--attention-fond); color: var(--attention); }

/* --- Messagerie -------------------------------------------------------- */
.messagerie { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 12px; }
.messagerie__liste { display: flex; flex-direction: column; }
.messagerie__item { padding: 9px 12px; border-bottom: 1px solid #efece6; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.messagerie__item:hover { background: #fcfaf7; }
.messagerie__item.actif { background: var(--bordeaux-clair); }
.messagerie__item.non-lu .messagerie__objet { font-weight: 750; }
.messagerie__objet { font-size: var(--ts-sm); font-weight: 600; }
.messagerie__apercu { font-size: 11px; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messagerie__corps { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.messagerie__texte { white-space: pre-wrap; font-size: var(--ts-md); line-height: 1.55; }

/* --- GED --------------------------------------------------------------- */
.ged { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; }
.ged__categories { display: flex; flex-direction: column; gap: 2px; }
.ged__categorie { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--ts-sm); font-weight: 550; background: none; border: none; text-align: left; width: 100%; }
.ged__categorie:hover { background: #f3efe9; }
.ged__categorie.actif { background: var(--bordeaux-clair); color: var(--bordeaux-fonce); font-weight: 700; }
.ged__categorie .badge { margin-left: auto; }

/* --- Organigramme / équipe -------------------------------------------- */
.equipe-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.membre { border: 1px solid var(--bordure); border-radius: var(--r-md); background: var(--blanc); padding: 11px; display: flex; gap: 9px; align-items: flex-start; }
.membre__nom { font-size: var(--ts-sm); font-weight: 700; }
.membre__poste { font-size: 10.5px; color: var(--gris); }

/* --- Qualité ----------------------------------------------------------- */
.severite { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; }
.severite--1 { color: var(--attention); }
.severite--2 { color: #c2410c; }
.severite--3 { color: var(--danger); }

/* --- Intégrations ------------------------------------------------------ */
.integration { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--bordure); border-radius: var(--r-md); background: var(--blanc); }
.integration__logo { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 10px; background: #eeebe5; color: #45413c; }
.integration__nom { font-size: var(--ts-sm); font-weight: 700; }
.integration__etat { font-size: 10.5px; color: var(--gris); }

/* --- Barres de graphique ---------------------------------------------- */
/* Les barres sont des <span> : sans display:block, la hauteur en % vaut 0 et
   la barre colorée ne s'affiche pas (défaut constaté à la capture). */
.barres { display: flex; flex-direction: column; gap: 7px; }
.barre-ligne { display: grid; grid-template-columns: 118px minmax(0, 1fr) 46px; gap: 8px; align-items: center; font-size: 11px; }
.barre-ligne__fond { display: block; height: 9px; background: #eeebe5; border-radius: var(--r-pilule); overflow: hidden; }
.barre-ligne__part { display: block; height: 100%; border-radius: var(--r-pilule); background: var(--bordeaux); min-width: 2px; }
.barre-ligne__valeur { text-align: right; font-variant-numeric: tabular-nums; color: var(--gris); }

/* Liste compacte (retards, alertes) : plus lisible qu'un tableau dans une
   carte étroite. */
.ligne-liste { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid #efece6; font-size: var(--ts-sm); }
.ligne-liste:last-child { border-bottom: none; }
.ligne-liste__ref { font-family: var(--mono); font-size: 11.5px; font-weight: 700; }
.ligne-liste__meta { font-size: 10.5px; color: var(--gris); }

/* --- Divers ------------------------------------------------------------ */
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.diff__case { border: 1px dashed var(--bordure-forte); border-radius: var(--r-sm); padding: 9px; font-size: var(--ts-sm); }
.diff__case--avant { background: #fbf9f5; }
.diff__case--apres { background: var(--ok-fond); border-color: #bfe0cc; }

.panneau-droit { position: sticky; top: 82px; }
.onglets-fiche { margin-bottom: 10px; }

.liste-notifications { display: flex; flex-direction: column; }
.notif { display: flex; gap: 9px; padding: 9px 12px; border-bottom: 1px solid #efece6; align-items: flex-start; }
.notif--non-lu { background: #fbf6f4; }
.notif__icone { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eeebe5; flex: 0 0 26px; }
.notif__texte { font-size: var(--ts-sm); }
.notif__meta { font-size: 10.5px; color: var(--gris); }

.actions-rapides { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 8px; }
.action-rapide {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--bordure); background: var(--blanc); cursor: pointer;
  font-size: var(--ts-sm); font-weight: 600; text-align: left;
  transition: border-color var(--transition), background var(--transition);
}
.action-rapide:hover { border-color: var(--bordeaux); background: var(--bordeaux-clair); }

.legendes { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10.5px; color: var(--gris); }
.legendes span { display: inline-flex; align-items: center; gap: 5px; }
