@font-face {
    font-family: 'TAN Tangkiwood';
    src: local('TAN Tangkiwood'), local('Tan-Tangkiwood');
}

:root {
  --bg-color: #FDF6EC;
  --sidebar-bg: #FFFDF8;
  --text-main: #1A1A1A;
  --border-dark: #1A1A1A;
  --primary: #FAD06C;
  --primary-hover: #e5b95a;
  --secondary: #e6a782;
  --white: #ffffff;
}
 body { margin: 0; font-family: 'Montserrat', sans-serif; background: linear-gradient(135deg, #FFFDF8 0%, #FDF6EC 100%); color: var(--text-main); display: flex; height: 100vh; overflow: hidden; }
h1, h2, h3 { font-family: 'TAN Tangkiwood', 'Playfair Display', serif; color: var(--text-main); }

/* SIDEBAR */
.sidebar { width: 260px; background-color: var(--sidebar-bg); border-right: 2px solid var(--border-dark); padding-top: 30px; padding-bottom: 20px; flex-shrink: 0; display:flex; flex-direction:column; overflow-y: auto; }
.brand-title { text-align: center; font-family: 'TAN Tangkiwood', 'Playfair Display', serif !important; color: var(--text-main); font-size: 2.8em; margin: 0; padding: 0; line-height: 0.9; }
.brand-tagline { text-align: center; font-size: 0.55em; color: var(--text-main); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 25px; padding-bottom: 25px; border-bottom: 2px solid var(--border-dark); font-weight: 800; margin-top: 10px; }
.menu-item { padding: 12px 20px; cursor: pointer; transition: 0.2s; font-size:0.95em; font-weight: 600; margin: 4px 15px; border-radius: 50px; border: 2px solid transparent; flex-shrink: 0; white-space: nowrap;}
.menu-item:hover { background-color: rgba(0,0,0,0.03); }
.menu-item.active { background-color: var(--primary); border: 2px solid var(--border-dark); font-weight: 800; box-shadow: 2px 2px 0px var(--border-dark); }
.menu-group { font-size:0.75em; color:#64748b; text-transform:uppercase; font-weight:800; letter-spacing:1px; margin: 15px 20px 5px 25px; flex-shrink: 0; white-space: nowrap;}
 
/* CONTENT AREA */
.main-content { flex: 1; padding: 30px; overflow-x: hidden; overflow-y: auto; box-sizing: border-box; }
.main-content.no-scroll { overflow-y: hidden; }
.page { display: none; animation: fadeIn 0.3s ease-in-out; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
 .card { background: var(--white); padding: 25px; border-radius: 16px; border: 2px solid var(--border-dark); box-shadow: 4px 4px 0px rgba(26,26,26,0.05); margin-bottom: 20px; }
 
 /* DASHBOARD SCROLLABLE AVEC ENCARTS POINTILLÉS */
.dashboard-grid { display: flex; flex-wrap: nowrap; gap: 20px; align-items: stretch; margin-top: 15px; overflow-x: auto; padding-bottom: 15px; height: calc(100vh - 280px); }
.dash-column { background: #f8fafc; padding: 15px; border-radius: 12px; border: 2px dashed #cbd5e1; min-width: 320px; flex: 1; display: flex; flex-direction: column; height: 100%; min-height: 0; box-sizing: border-box; }
.dash-column h3 { margin-top: 0; padding-bottom: 10px; border-bottom: 2px solid var(--border-dark); font-size: 1.1em; margin-bottom: 15px; display:flex; justify-content:space-between; align-items:center; flex-shrink: 0;}
.dash-count { background: var(--white); color: var(--text-main); padding: 2px 8px; border-radius: 20px; font-size: 0.8em; font-family: 'Montserrat', sans-serif; border: 2px solid var(--border-dark); font-weight: 700; }
.dash-cards { overflow-y: auto; flex: 1; padding-right: 5px; min-height: 0; }
.dash-cards::-webkit-scrollbar { width: 6px; }
.dash-cards::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 4px; }

 /* KANBAN ÉPURÉ AVEC ENCARTS POINTILLÉS */
.kanban-board { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; align-items: stretch; height: calc(100vh - 320px); overflow-y: hidden !important; }
.kanban-col { background: #f8fafc; flex: 1; min-width: 280px; padding: 15px; border-radius: 12px; border: 2px dashed #cbd5e1; display: flex; flex-direction: column; height: 100%; min-height: 0; box-sizing: border-box;}
.kanban-col h3 { margin-top: 0; font-size: 1.1em; border-bottom: 2px solid var(--border-dark); padding-bottom: 8px; color: var(--text-main); flex-shrink:0; margin-bottom: 15px; font-weight: 800;}
.kanban-col-count { float: right; background: var(--white); color: var(--text-main); padding: 2px 8px; border-radius: 20px; font-size: 0.8em; font-family: 'Montserrat', sans-serif; border: 2px solid var(--border-dark); font-weight: 700;}
.kanban-cards { overflow-y: auto !important; flex: 1; padding-right: 5px; min-height: 0;}
.kanban-cards::-webkit-scrollbar { width: 6px; }
.kanban-cards::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 4px; }

/* MODE LISTE */
.liste-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; border: 2px solid var(--border-dark); box-shadow: 3px 3px 0px rgba(26,26,26,0.05); margin-top:10px; }
.liste-table th { background: var(--sidebar-bg); border-bottom: 2px solid var(--border-dark); padding: 14px 15px; text-align: left; font-weight: 800; font-size: 0.85em; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.5px; }
.liste-table td { padding: 14px 15px; border-bottom: 1px solid #e2e8f0; font-size: 0.9em; color: #334155; font-weight: 500; }
.liste-table tr:hover td { background: #f8fafc; cursor: pointer; }
.liste-table tr:last-child td { border-bottom: none; }

.tache-card, .crm-item { cursor: pointer; transition: 0.2s; border: 2px solid var(--border-dark); background: var(--white); border-radius: 12px; margin-bottom: 12px; box-shadow: 2px 2px 0px rgba(26,26,26,0.1); }
.tache-card:hover, .crm-item:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0px rgba(26,26,26,0.2); }
.tache-card { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-left: 8px solid var(--border-dark); }
.tache-card.retard { border-left-color: #ef4444; background: #fff5f5; }
.tache-card.nego-top { background: #fffbf0; border-left-color: var(--primary); }
.tache-card.facture-alerte { border-left-color: #8b5cf6; background: #eff6ff; }
 .tache-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.tache-title { font-weight: 800; font-size: 1.1em; color: var(--text-main); }
.tache-resume { font-size: 0.88em; color: #475569; font-style: italic; background: rgba(0,0,0,0.03); padding: 8px 12px; border-radius: 6px; border: 1px dashed #cbd5e1; margin-top: 6px; line-height:1.4;}

.tag-phase { font-size: 0.7em; font-weight: 800; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px; background: #e2e8f0; color: #334155; }
.badge-retard { background: #fee2e2; color: #dc2626; font-size: 0.75em; padding: 4px 10px; border-radius: 20px; font-weight: 800; border: 1px solid #fca5a5;}
.badge-today { background: #e0f2fe; color: #0284c7; font-size: 0.75em; padding: 4px 10px; border-radius: 20px; font-weight: 800; border: 1px solid #7dd3fc;}
.badge-top-nego { background: var(--primary); color: var(--text-main); font-size: 0.75em; padding: 4px 10px; border-radius: 20px; font-weight: 800; border: 1px solid var(--border-dark);}
.badge-facture { background: #8b5cf6; color: white; font-size: 0.75em; padding: 4px 10px; border-radius: 20px; font-weight: 800; border: 1px solid #7c3aed;}

.filters-bar { display: flex; gap: 15px; margin-bottom: 20px; background: var(--white); padding: 15px; border-radius: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); align-items: center; flex-wrap: wrap; border: 2px solid var(--border-dark);}
.filters-bar input, .filters-bar select { flex: 1; padding: 10px; border: 2px solid #cbd5e1; border-radius: 8px; outline: none; min-width: 150px; font-family: 'Montserrat', sans-serif; font-weight:600;}
.filters-bar input:focus, .filters-bar select:focus { border-color: var(--border-dark); }
.compteur-resultats { background: var(--bg-color); color: var(--text-main); font-weight: 800; font-size: 0.85em; padding: 8px 14px; border-radius: 20px; white-space: nowrap; border: 2px solid var(--border-dark);}

.crm-item { display: flex; justify-content: space-between; align-items: center; padding: 18px; }
.crm-info { flex: 1; margin-right: 20px; }
.crm-nom { font-weight: 800; font-size: 1.15em; color: var(--text-main); margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.crm-details { font-size: 0.85em; color: #64748b; margin-bottom: 12px; display: flex; gap: 15px; flex-wrap: wrap; font-weight: 600;}
.crm-resume-box { background: var(--bg-color); border-left: 4px solid var(--primary); color: var(--text-main); padding: 10px 12px; border-radius: 0 8px 8px 0; font-size: 0.85em; margin-top:10px; font-weight: 500;}
 .badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75em; font-weight: 800; background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1;}
.badge-nego { background: var(--primary); color: var(--text-main); border-color: var(--border-dark);}
.badge-lead { background: var(--bg-color); color: var(--text-main); border-color: var(--border-dark);}

/* BOUTONS (SANS OMBRE) */
.btn { background: var(--primary); color: var(--text-main); border: 2px solid var(--border-dark); padding: 12px 26px; border-radius: 50px; cursor: pointer; font-weight: 800; transition: 0.2s; font-family: 'Montserrat', sans-serif; box-shadow: none;}
.btn:hover { background: var(--primary-hover); }

.btn-cancel { background: var(--sidebar-bg); color: var(--text-main); border: 2px solid var(--border-dark); padding: 12px 26px; border-radius: 50px; cursor: pointer; font-weight: 800; font-family: 'Montserrat', sans-serif; box-shadow: none; transition: 0.2s;}
.btn-cancel:hover { background: #f1f5f9; }

.btn-danger { background: #ef4444; color: white; border: 2px solid var(--border-dark); padding: 12px 26px; border-radius: 50px; cursor: pointer; font-weight: 800; font-family: 'Montserrat', sans-serif; box-shadow: none; transition: 0.2s;}
.btn-danger:hover { background: #dc2626; }

.btn-solde { background: #bbf7d0; color: var(--text-main); border: 2px solid var(--border-dark); padding: 12px 26px; border-radius: 50px; cursor: pointer; font-weight: 800; font-family: 'Montserrat', sans-serif; box-shadow: none; transition: 0.2s; }
.btn-solde:hover { background: #86efac; }

.btn-ouvrir { background: var(--white); color: var(--text-main); border: 2px solid var(--border-dark); padding: 8px 20px; border-radius: 50px; cursor: pointer; font-weight: 800; transition: 0.2s; pointer-events: auto; font-family: 'Montserrat', sans-serif; box-shadow: none; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;}
.btn-ouvrir:hover { background: var(--bg-color); }

.btn-add-contact { background: var(--white); color: var(--text-main); border: 2px solid var(--border-dark); padding: 8px 16px; border-radius: 50px; cursor: pointer; font-size: 0.85em; font-weight: 800; font-family: 'Montserrat', sans-serif; display: inline-flex; align-items: center; gap: 5px; transition: 0.2s; box-shadow: none;}
.btn-add-contact:hover { background: var(--bg-color); }

.btn-del-contact { background: #fee2e2; color: #ef4444; border: 2px solid #ef4444; padding: 4px 10px; border-radius: 20px; cursor: pointer; font-weight: 800; font-family: 'Montserrat', sans-serif; transition: 0.2s; box-shadow: none;}
.btn-del-contact:hover { background: #fca5a5; }

.btn-move-contact { background: var(--white); color: var(--text-main); border: 2px solid var(--border-dark); padding: 4px 10px; border-radius: 20px; cursor: pointer; font-weight: 800; font-size: 0.8em; font-family: 'Montserrat', sans-serif; transition: 0.2s; box-shadow: none;}
.btn-move-contact:hover { background: var(--bg-color); }

.btn-view-toggle { background: var(--sidebar-bg); color: var(--text-main); border: 2px solid var(--border-dark); padding: 8px 16px; border-radius: 50px; cursor: pointer; font-weight: 800; font-size: 0.85em; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; box-shadow: none; text-transform: uppercase; letter-spacing: 0.5px;}
.btn-view-toggle:hover { background: var(--white); }

.btn-gemini { display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: var(--white); color: var(--text-main); border: 2px solid var(--border-dark); padding: 0 14px; border-radius: 8px; font-size: 0.85em; text-decoration: none; font-weight: 800; white-space: nowrap; transition: 0.2s; box-shadow: none; margin: 0; box-sizing: border-box; height: 42px; }
.btn-gemini:hover { background: var(--bg-color); }

 /* NOUVEAU BOUTON VUE LISTE/KANBAN */
.btn-view-toggle { background: var(--sidebar-bg); color: var(--text-main); border: 2px solid var(--border-dark); padding: 8px 16px; border-radius: 50px; cursor: pointer; font-weight: 800; font-size: 0.85em; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; box-shadow: 2px 2px 0px var(--border-dark); text-transform: uppercase; letter-spacing: 0.5px;}
.btn-view-toggle:hover { background: var(--white); transform: translate(1px, 1px); box-shadow: 1px 1px 0px var(--border-dark); }

/* OVERLAYS ET TIROIRS */
.overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 999; backdrop-filter: blur(3px);}
.overlay.actif { display: block; }
.tiroir { position: fixed; top: 0; right: -750px; width: 720px; height: 100vh; background: var(--white); box-shadow: -5px 0 25px rgba(0,0,0,0.15); transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1000; padding: 30px; overflow-y: auto; box-sizing: border-box; border-left: 2px solid var(--border-dark);}
.tiroir.ouvert { right: 0; }
.tiroir-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--border-dark); padding-bottom: 15px; margin-bottom: 20px; }
.btn-fermer { background: none; border: none; font-size: 1.8em; cursor: pointer; color: var(--text-main); padding: 0; font-weight: bold;}
.btn-fermer:hover { color: #ef4444; }
.section-title { font-size: 0.9em; font-weight: 800; color: var(--text-main); border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; margin-top: 25px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; display: flex; justify-content: space-between; align-items: center; }
 /* GRILLES */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: flex-start; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; align-items: flex-start; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 15px; align-items: flex-start; }

label { display: flex; align-items: flex-end; min-height: 2.4em; margin-bottom: 6px; font-weight: 700; color: #334155; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.2; }

.input-with-btn { display: flex; gap: 8px; align-items: stretch; }
.input-with-btn input { flex: 1; margin: 0; }
.btn-gemini { display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: var(--white); color: var(--text-main); border: 2px solid var(--border-dark); padding: 0 14px; border-radius: 8px; font-size: 0.85em; text-decoration: none; font-weight: 800; white-space: nowrap; transition: 0.2s; box-shadow: 2px 2px 0px var(--border-dark); margin: 0; box-sizing: border-box; height: 42px; }
.btn-gemini:hover { background: var(--bg-color); transform: translate(1px, 1px); box-shadow: 1px 1px 0px var(--border-dark); }

.form-group { margin-bottom: 15px; }
input, select, textarea { width: 100%; padding: 10px; border: 2px solid #cbd5e1; border-radius: 8px; box-sizing: border-box; font-family: 'Montserrat', sans-serif; font-size: 0.95em; font-weight: 500; margin: 0; height: 42px; }
textarea { height: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--border-dark); }

.contact-card { background: var(--sidebar-bg); border: 2px solid var(--border-dark); padding: 16px; border-radius: 12px; margin-bottom: 12px; box-shadow: 2px 2px 0px rgba(26,26,26,0.05);}
.contact-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 800; font-size: 0.9em; color: var(--text-main); }
.badge-principal { background: var(--primary); color: var(--text-main); padding: 4px 10px; border-radius: 20px; font-size: 0.8em; font-weight: 800; border: 1px solid var(--border-dark);}

.history-list { background: var(--white); border: 2px solid #cbd5e1; border-radius: 8px; padding: 12px; max-height: 180px; overflow-y: auto; margin-bottom: 12px; font-size: 0.9em; font-weight: 500;}
.history-item { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #f1f5f9; padding-bottom: 8px; margin-bottom: 8px; color: var(--text-main); }
.btn-del-note { background: #fee2e2; color: #ef4444; border: 1px solid #ef4444; cursor: pointer; font-size: 0.8em; padding: 2px 8px; border-radius: 20px; font-weight:bold;}

.historique-projets-client { background: var(--sidebar-bg); border: 2px solid var(--border-dark); border-radius: 12px; padding: 15px; margin-bottom: 15px; }
.projet-passe-card { background: var(--white); border: 2px solid #cbd5e1; padding: 12px 16px; border-radius: 8px; margin-top: 10px; font-size: 0.9em; }
.projet-passe-details { display: none; margin-top: 12px; padding-top: 10px; border-top: 2px dashed #cbd5e1; background: #f8fafc; padding: 12px; border-radius: 6px; }

.toast-container { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background-color: var(--text-main); color: var(--white); padding: 14px 28px; border-radius: 50px; font-weight: 800; box-shadow: 4px 4px 0px rgba(0,0,0,0.2); opacity: 0; transform: translateY(20px); transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); display: flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif;}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background-color: #10b981; }
.toast.error { background-color: #ef4444; }
 #modal-confirm { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10002; width: 380px; text-align: center; margin: 0; box-shadow: 8px 8px 0px rgba(26,26,26,0.15); border-radius: 20px;}

.phase-selector { background: var(--sidebar-bg); border: 2px solid var(--border-dark); padding: 15px; border-radius: 12px; margin-bottom: 25px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; box-shadow: 2px 2px 0px rgba(26,26,26,0.05);}
.phase-badge { background: var(--border-dark); color: white; padding: 6px 14px; border-radius: 20px; font-weight: 800; font-size: 0.9em; letter-spacing: 1px; }
.admin-select { padding: 10px 16px; border: 2px solid var(--border-dark); border-radius: 50px; font-weight: 800; color: var(--text-main); background: var(--white); outline: none; font-family: 'Montserrat', sans-serif;}
 .dropdown { position: relative; display: inline-block; flex-shrink: 0; }
.dropdown-content { display: none; position: absolute; right: 0; top: 100%; background-color: white; min-width: 200px; box-shadow: 4px 4px 0px rgba(26,26,26,0.1); z-index: 10; border-radius: 12px; overflow: hidden; border: 2px solid var(--border-dark); margin-top: 5px;}
.dropdown-content.show { display: block; }
.dropdown-content a { color: var(--text-main); padding: 14px 20px; text-decoration: none; display: block; font-weight: 800; font-size: 0.95em; border-bottom: 2px solid #f1f5f9; font-family: 'Montserrat', sans-serif; }
.dropdown-content a:hover { background-color: var(--primary); color: var(--text-main); }
 /* --- VISUEL TEMPS RÉEL FIREBASE --- */
.champ-occupe { border: 2px solid #8b5cf6 !important; background-color: #f5f3ff !important; pointer-events: none; }
.etiquette-presence { position: absolute; top: -10px; right: 10px; background: #8b5cf6; color: white; font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 4px; z-index: 10; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* ==========================================
 CENTRE DE NOTIFICATIONS (CLOCHE & TIROIR)
 ========================================== */
.notif-container { position: fixed; bottom: 35px; right: 35px; z-index: 1000; }
.btn-notif-bell { background: #ffffff; border: 2px solid var(--border-dark, #cbd5e1); border-radius: 50%; width: 44px; height: 44px; font-size: 1.2em; cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); transition: all 0.2s ease; }
.btn-notif-bell:hover { background: #f8fafc; transform: scale(1.08); }
.notif-badge { position: absolute; top: -4px; right: -4px; background-color: #ef4444; color: white; font-size: 0.65em; font-weight: 800; padding: 2px 6px; border-radius: 10px; border: 2px solid white; box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.notif-item { padding: 12px; border-radius: 8px; border-left: 4px solid #cbd5e1; background: #f8fafc; transition: all 0.2s ease; cursor: pointer; }
.notif-item:hover { background: #f1f5f9; transform: translateX(3px); }
.notif-item.non-lue { background: #ffffff; border-left-color: var(--primary, #8b5cf6); box-shadow: 0 2px 6px rgba(139, 92, 246, 0.12); }
.notif-titre { font-weight: 700; font-size: 0.9em; color: var(--text-main); margin-bottom: 4px; }
.notif-message { font-size: 0.82em; color: #475569; line-height: 1.4; }
.notif-date { font-size: 0.72em; color: #94a3b8; margin-top: 6px; text-align: right; }

/* 🎚️ SÉLECTEURS "OUI / NON" (Façon site web) */
.custom-toggle { position: relative; display: flex; align-items: center; width: 100px; height: 42px; box-sizing: border-box; background-color: #f1f5f9; border: 2px solid #cbd5e1; border-radius: 50px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); margin: 0 auto; }
.custom-toggle input[type="checkbox"] { display: none !important; }
.custom-toggle .knob { position: absolute; left: 4px; width: 30px; height: 30px; background-color: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 2; }
.custom-toggle .toggle-text { position: absolute; right: 16px; font-family: 'Montserrat', sans-serif; font-size: 0.85em; font-weight: 800; color: #64748b; transition: all 0.3s; z-index: 1; }
.custom-toggle .toggle-text::after { content: "NON"; }
.custom-toggle:has(input[type="checkbox"]:checked) { background-color: var(--primary); border-color: var(--border-dark); }
.custom-toggle:has(input[type="checkbox"]:checked) .knob { transform: translateX(62px); }
.custom-toggle:has(input[type="checkbox"]:checked) .toggle-text { right: auto; left: 16px; color: var(--text-main); }
.custom-toggle:has(input[type="checkbox"]:checked) .toggle-text::after { content: "OUI"; }
.form-group:has(.custom-toggle) label:first-child { justify-content: center; text-align: center; }

/* CHECKBOX SETTINGS ALIGNÉS (Restauration) */
.setting-row { display: flex; align-items: center; gap: 12px; padding: 15px; border-bottom: 1px solid #e2e8f0; }
.setting-row:last-child { border-bottom: none; }
.setting-row input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; margin:0; flex-shrink:0; accent-color: var(--primary); }
.setting-row label { font-weight: 600; font-size: 0.95em; color: var(--text-main); cursor: pointer; margin:0; line-height: 1.3; text-transform:none; flex:1; display: block; min-height: 0; }
.setting-category { font-weight: 800; font-size: 1.1em; color: var(--primary); margin-top: 25px; margin-bottom: 10px; border-bottom: 2px solid var(--border-dark); padding-bottom: 8px;}

/* 🛑 CORRECTIF DÉFINITIF SPÉCIFIQUE ONGLET PRODUCTION */
.kanban-board { height: calc(100vh - 340px) !important; }
#page-production .kanban-board, #page-Production .kanban-board, [id*="production"] .kanban-board { height: calc(100vh - 380px) !important; }

/* ==========================================
 🛡️ INTERFACE ADMIN & EQUIPE
 ========================================== */
.admin-team-card { margin-top: 20px; }
.admin-team-header { display: flex; justify-content: space-between; align-items: center; }
.admin-team-header h2 { margin-top: 0; }
.admin-team-desc { color: #64748b; margin-top: -10px; font-size: 0.85em; font-weight: 600; }
 .modal-footer-bar { display: flex; gap: 10px; margin-top: 30px; border-top: 2px solid #e2e8f0; padding-top: 20px; }
.modal-footer-spacer { flex: 1; }
.modal-masques-desc { color: #64748b; font-weight: 600; display: block; margin-top: 5px; }

/* PILOTAGE FIX */
#pil-dashboard-container { margin-bottom: 20px !important; width: 100% !important; }
#pil-dashboard-container .dashboard-grid { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 15px !important; width: 100% !important; height: auto !important; align-items: stretch !important; }
#pil-dashboard-container .card { margin-bottom: 0 !important; padding: 18px 16px !important; box-sizing: border-box !important; display: flex !important; flex-direction: column !important; justify-content: space-between !important; height: auto !important; min-height: 0 !important; }
.pil-card-title { margin: 0 0 8px 0 !important; color: #475569 !important; font-size: 0.85em !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; font-weight: 800 !important; white-space: nowrap !important; }
.pil-card-value { font-size: 1.55em !important; font-weight: 800 !important; white-space: nowrap !important; margin-bottom: 4px !important; line-height: 1.1 !important; }
.pil-card-sub { font-size: 0.8em !important; color: #64748b !important; margin-top: auto !important; padding-top: 8px !important; border-top: 1px solid #f1f5f9 !important; }
#pil-leaderboard-container, #pil-activity-container, #pil-monthly-container, #pil-drilldown-container { margin-top: 15px !important; }
@media (max-width: 1000px) { #pil-dashboard-container .dashboard-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 700px) { #pil-dashboard-container .dashboard-grid { grid-template-columns: repeat(1, 1fr) !important; } }

/* Nom de l'entreprise cliquable dans la fiche */
.clickable-company { color: var(--primary); text-decoration: underline; cursor: pointer; transition: 0.2s; }
.clickable-company:hover { color: var(--primary-hover); }

/* Barre de boutons Fixe en bas des fiches */
.tiroir form { display: flex; flex-direction: column; min-height: calc(100vh - 100px); }
.modal-footer-bar, 
#fiche-tiroir > form > div:last-child, 
#tiroir-entreprise > form > div:last-child, 
#tiroir-influenceur > form > div:last-child, 
#modal-nouvelle-ent > form > div:last-child, 
#modal-nouvel-influ > form > div:last-child,
#modal-nouveau-prj > form > div:last-child {
    position: sticky !important;
    bottom: -30px !important; /* Colle le bloc tout en bas */
    background: var(--white) !important;
    padding: 20px 0 30px 0 !important;
    margin-top: auto !important;
    border-top: 2px solid var(--border-dark) !important;
    z-index: 100 !important;
}

/* Fix visuel du menu Admin */
#admin-equipe-container table { background: white; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); border-radius: 12px; }
#admin-equipe-container th { background: #f8fafc; border-bottom: 2px solid var(--border-dark); }

/* 🛡️ Fix : Grille pour les paramètres du compte membre */
#am-dynamic-statuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#am-dynamic-statuts .form-group { margin: 0 !important; }