/* =======================================================
   1. STYLES PAGE LOGIN (RESTAURÉS)
   ======================================================= */
:root {
  --primarycolor: #FFC72D; /* Jaune Quartz */
}

/* Conteneur principal qui centre tout sur la page */
.landing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: white;
    background: #0d122b; /* Couleur de fond simple de secours */
    /* Dégradé radial bleu nuit caractéristique de votre login */
    background: radial-gradient(circle, #1a234f 0%, #0d122b 70%);
    font-family: sans-serif;
}

/* Boîte contenant le logo et le formulaire */
.landing-box {
    display: flex;
    align-items: center;
    gap: 60px; /* Espace entre le logo et le formulaire */
    padding: 20px;
}

/* Style de la colonne de droite (Formulaire) */
.landing-form h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0;
}

.landing-form .subtitle {
    color: #aab2c2;
    margin-bottom: 2rem;
}

/* Champs de formulaire sur fond sombre (Login) */
.form-control-dark {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.form-control-dark::placeholder {
  color: #aab2c2 !important;
  opacity: 1; 
}

/* Liens en jaune sur le login */
.landing-form a {
    color: var(--primarycolor); 
}


/* =======================================================
   2. STYLES SPÉCIFIQUES PAGE V2 (RELEASE NOTES)
   ======================================================= */

/* Force le fond gris clair du dashboard uniquement sur la page v2 */
body.v2-page {
    background: #f4f6f9 !important; 
    color: #5a5c69;
}

/* --- Typographie & Couleurs V2 (Surcharge le jaune global) --- */
:root {
    --quartz-blue: #1e3d73; /* Bleu foncé du logo/dashboard */
    --quartz-green: #1ee0ac; /* Vert succès du dashboard */
    --quartz-text: #5a5c69;  /* Gris texte */
}

.v2-header {
    background: #fff;
    padding: 80px 0 60px;
    margin-bottom: 60px;
    border-bottom: 1px solid #e3e6f0;
}

/* Titres en Bleu Foncé (et pas en jaune) */
.v2-title, .feature-text h2 {
    color: var(--quartz-blue) !important; 
    font-weight: 800;
}

.feature-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.v2-subtitle {
    font-size: 1.2rem;
    color: #858796;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Layout ZigZag --- */
.zigzag-section {
    padding: 60px 0;
}

.feature-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--quartz-text);
}

/* Liste à puces propre */
.feature-list li {
    margin-bottom: 10px;
    color: var(--quartz-text);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
}
.feature-list li i {
    margin-right: 10px;
    font-weight: bold;
}

/* --- Mockups (Fausses fenêtres) --- */
.mockup-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    padding: 30px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #e3e6f0;
    position: relative;
    transition: transform 0.3s ease;
}

.mockup-card:hover {
    transform: translateY(-5px);
}

/* La barre en haut de la carte */
.mockup-header-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Cercles d'icônes */
.big-icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.big-icon {
    font-size: 3rem;
}

.mockup-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-top: 15px;
    text-align: center;
    color: #858796;
}

/* Badges pour les Rôles */
.role-badge {
    background-color: #fff;
    border: 1px solid #e3e6f0;
    color: var(--quartz-blue);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Utilitaires couleurs spécifiques V2 */
.text-quartz-blue { color: var(--quartz-blue) !important; }
.bg-quartz-blue { background-color: var(--quartz-blue) !important; }
.text-quartz-green { color: var(--quartz-green) !important; }
.bg-quartz-green { background-color: var(--quartz-green) !important; }

/* Correction spécifique pour le fond jaune pâle des icônes */
.bg-pale-blue { background-color: #f0f4ff; }
.bg-pale-green { background-color: #e6fffa; }
.bg-pale-yellow { background-color: #fffbf0; }
.bg-pale-gray { background-color: #eaecf4; }
.bg-pale-info { background-color: #f4faff; }


/* ==========================================
   AUTH FOOTER (Liens bas de page)
   ========================================== */
.login-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1); /* Ligne subtile (ou rgba(255,255,255,0.1) si fond sombre) */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    font-size: 0.85rem;
    width: 100%;
}

.login-footer a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.login-footer a:hover {
    color: var(--primarycolor); /* Bleu Quartz */
    text-decoration: none;
}

.login-footer .separator {
    color: #ccc;
    user-select: none;
}

/* =======================================================
   3. NAV PUBLIQUE — Liens header
   ======================================================= */
.public-nav-link {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.65);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 100%;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.public-nav-link:hover, .public-nav-link:focus { color: #fff; text-decoration: none; }
.public-nav-link.active { color: var(--primarycolor); font-weight: 700; border-bottom-color: var(--primarycolor); }
.public-nav-link i { font-size: 0.82rem; flex-shrink: 0; }

.nav-divider-v {
    width: 1px; height: 18px;
    background: rgba(255,255,255,0.18);
    align-self: center;
    margin: 0 6px;
    flex-shrink: 0;
}


/* =======================================================
   4. PAGE USINE — Bandeau unique
   ======================================================= */

/* Le bandeau fusionne toutes les infos (badge + titre + stats + hint) */
.usine-band {
    margin-top: 58px;            /* hauteur du header fixe */
    background: linear-gradient(90deg, #0d1929 0%, #1a2f55 55%, #1e3d73 100%);
    border-bottom: 1px solid rgba(255,193,7,0.22);
    padding: 0 24px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
}

.usine-band-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.usine-band-badge {
    flex-shrink: 0;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ffc107;
    background: rgba(255,193,7,0.12);
    border: 1px solid rgba(255,193,7,0.3);
    padding: 2px 9px;
    border-radius: 20px;
}

.usine-band-sep {
    width: 1px; height: 14px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.usine-band-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}
.usine-band-title strong { color: #ffc107; font-weight: 700; }

.usine-band-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}
.usine-band-num {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffc107;
}
.usine-band-lbl {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
}

.usine-band-right {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}
.usine-band-right i { font-size: 0.7rem; color: rgba(255,193,7,0.45); }


/* =======================================================
   5. PAGE USINE — Viewer plein écran
   ======================================================= */

/* Viewport directement sous le bandeau, plein écran */
.svg-viewport {
    position: relative;
    width: 100%;
    /* 58px header + 40px bandeau = 98px */
    height: calc(100vh - 98px);
    min-height: 500px;
    overflow: hidden;
    cursor: grab;
    background: #f7f8fb;
    user-select: none;
}
.svg-viewport:active { cursor: grabbing; }

.svg-inner { position: absolute; top:0; left:0; transform-origin:0 0; }
.svg-inner svg { display: block; }

.node-overlay { position: absolute; top:0; left:0; pointer-events: none; }

/* Hotspots */
.node-hotspot {
    position: absolute;
    cursor: pointer;
    pointer-events: all;
    border-radius: 5px;
    transition: background 0.12s, box-shadow 0.12s;
}
.node-hotspot:hover {
    background: rgba(255,193,7,0.18);
    box-shadow: 0 0 0 2px rgba(255,193,7,0.45), 0 0 14px rgba(255,193,7,0.12);
    z-index: 10;
}
.node-hotspot:hover .node-tip { opacity:1; transform:translateX(-50%) translateY(-2px); }

.node-tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1e3d73;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    padding: 3px 9px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 20;
}
.node-tip::after {
    content:'';
    position:absolute; top:100%; left:50%;
    transform:translateX(-50%);
    border:4px solid transparent;
    border-top-color:#1e3d73;
}

/* Toolbar zoom */
.factory-toolbar {
    position: absolute;
    bottom: 14px; right: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 50;
}
.tb-btn {
    width: 34px; height: 34px;
    background: #fff;
    border: 1px solid #dde3ef;
    border-radius: 8px;
    color: #1e3d73;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(30,61,115,0.10);
    transition: border-color 0.15s, color 0.15s;
    padding: 0; line-height: 1;
}
.tb-btn:hover { border-color: #ffc107; color: #e6a800; }

.tb-pct {
    font-size: 0.6rem; text-align: center;
    color: #8898aa; font-family: monospace;
    background: #fff; border: 1px solid #dde3ef;
    border-radius: 6px; padding: 3px 6px; min-width: 40px;
}


/* =======================================================
   6. PAGE USINE — Panel latéral
   ======================================================= */
.usine-panel {
    position: fixed; top:0; right:0;
    width: min(460px, 100vw);
    height: 100vh;
    background: #fff;
    border-left: 1px solid #dde3ef;
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
    display: flex; flex-direction: column;
    box-shadow: -12px 0 40px rgba(30,61,115,0.12);
}
.usine-panel.open { transform: translateX(0); }

.panel-head {
    padding: 1.25rem 1.5rem 1rem;
    flex-shrink: 0; position: relative;
    background: linear-gradient(135deg, #0d1929 0%, #1e3d73 100%);
}
.panel-eyebrow { font-size:0.58rem; letter-spacing:0.18em; text-transform:uppercase; color:#ffc107; font-weight:700; margin-bottom:4px; }
.panel-title { font-size:1.3rem; font-weight:800; color:#fff; letter-spacing:-0.02em; line-height:1.2; padding-right:2rem; }
.panel-close-btn {
    position:absolute; top:1rem; right:1rem;
    background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.2);
    color:rgba(255,255,255,0.7); width:28px; height:28px;
    border-radius:6px; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    font-size:0.8rem; transition:background 0.15s,color 0.15s; line-height:1;
}
.panel-close-btn:hover { background:rgba(255,255,255,0.2); color:#fff; }

.panel-login-bar { background:rgba(255,193,7,0.07); border-bottom:1px solid rgba(255,193,7,0.18); padding:7px 1.5rem; flex-shrink:0; }
.panel-login-link { display:inline-flex; align-items:center; gap:7px; font-size:0.73rem; font-weight:600; color:#e6a800; text-decoration:none; letter-spacing:0.03em; transition:color 0.15s; }
.panel-login-link:hover { color:#ffc107; text-decoration:none; }
.panel-login-link i { font-size:0.78rem; }

.panel-chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.pchip { font-size:0.58rem; padding:3px 9px; border-radius:20px; font-weight:600; letter-spacing:0.05em; }
.pchip-gold  { background:rgba(255,193,7,0.15);  color:#e6a800; border:1px solid rgba(255,193,7,0.3); }
.pchip-blue  { background:rgba(255,255,255,0.1); color:rgba(255,255,255,0.6); border:1px solid rgba(255,255,255,0.18); }
.pchip-green { background:rgba(23,179,163,0.15); color:#17b3a3; border:1px solid rgba(23,179,163,0.3); }

.panel-body { flex:1; overflow-y:auto; padding:1.25rem 1.5rem; scrollbar-width:thin; scrollbar-color:#dde3ef transparent; }
.panel-body::-webkit-scrollbar { width:4px; }
.panel-body::-webkit-scrollbar-thumb { background:#dde3ef; border-radius:2px; }

.panel-section-label { font-size:0.6rem; letter-spacing:0.15em; text-transform:uppercase; color:#aab4c8; font-weight:700; margin:1rem 0 0.5rem; }
.panel-desc-box { background:#e8eef8; border-left:3px solid #1e3d73; border-radius:0 8px 8px 0; padding:10px 12px; font-size:0.83rem; color:#1e3d73; line-height:1.5; }

.ss-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:0.75rem; }
.ss-slot {
    background:#f8f9fc; border:1.5px dashed #c8d0e0; border-radius:8px;
    aspect-ratio:16/10; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:4px; color:#aab4c8; font-size:0.68rem; cursor:pointer; position:relative; overflow:hidden;
    transition:border-color 0.2s,background 0.2s,color 0.2s;
}
.ss-slot:hover { border-color:#e6a800; background:rgba(255,193,7,0.05); color:#e6a800; }
.ss-slot img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:7px; }
.ss-slot input[type="file"] { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; z-index:2; }
.ss-slot i { font-size:1rem; }

.panel-notes {
    width:100%; min-height:72px; border:1.5px solid #dde3ef; border-radius:8px;
    padding:9px 11px; font-size:0.78rem; color:#2d3748; font-family:monospace;
    resize:vertical; outline:none; line-height:1.5; transition:border-color 0.2s; background:#fff;
}
.panel-notes:focus { border-color:#1e3d73; }

.usine-overlay-bg { position:fixed; inset:0; background:rgba(13,25,41,0.4); z-index:1090; opacity:0; pointer-events:none; transition:opacity 0.3s; backdrop-filter:blur(2px); }
.usine-overlay-bg.show { opacity:1; pointer-events:all; }

/* CTA */
.usine-cta { background:linear-gradient(135deg,#0d1929 0%,#1e3d73 100%); padding:2.5rem 0; text-align:center; }
.usine-cta h2 { color:#fff; font-weight:800; margin-bottom:0.4rem; font-size:1.4rem; }
.usine-cta p  { color:rgba(255,255,255,0.5); margin-bottom:1.25rem; font-size:0.9rem; }