* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial; color: #f1f5f9; background: #0f172a; }

/* ===== SCROLLBAR STYLES ===== */
/* Styles pour WebKit (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

*::-webkit-scrollbar-track {
  background: #0f172a;
  border-left: 10px solid #0f172a;
  margin: 8px 0;
}

*::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 8px;
  border: 5px solid #0f172a;
}

*::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

*::-webkit-scrollbar-corner {
  background: #0f172a;
}

/* Styles pour Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #475569 #0f172a;
}

/* Espacement supplémentaire pour les modales avec scrollbar */
.swal2-popup {
  padding-right: 12px;
}

/* Flash Messages - Maintenus pour compatibilité mais masqués par SweetAlert2 */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.flash {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flash-success {
    background: #064e3b;
    color: #6ee7b7;
    border-left-color: #22c55e;
}

.flash-error {
    background: #7f1d1d;
    color: #fca5a5;
    border-left-color: #ef4444;
}

.flash-warning {
    background: #78350f;
    color: #fcd34d;
    border-left-color: #f59e0b;
}

.flash-info {
    background: #1e3a8a;
    color: #93c5fd;
    border-left-color: #3b82f6;
}

/* Styles personnalisés pour SweetAlert2 */
.swal2-popup,
.sweet-alert-popup {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    background: #1e293b !important;
    color: #f1f5f9 !important;
    width: 800px !important;
    max-width: 90vw !important;
}

/* Styles pour tous les éléments dans les modales SweetAlert2 */
.swal2-popup * {
    color: inherit;
}

.swal2-popup input,
.swal2-popup select,
.swal2-popup textarea {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border: 0.5px solid #475569 !important;
}

.swal2-popup input:focus,
.swal2-popup select:focus,
.swal2-popup textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.swal2-popup label {
    color: #cbd5e1 !important;
}

.swal2-popup .form-control {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border: 0.5px solid #475569 !important;
}

.swal2-popup small {
    color: #94a3b8 !important;
}

.sweet-alert-popup .swal2-title {
    font-size: 1.5em !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important;
}

.sweet-alert-popup .swal2-html-container {
    font-size: 1em !important;
    color: #94a3b8 !important;
    line-height: 1.6 !important;
}

.sweet-alert-popup .swal2-confirm {
    background: #667eea !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.sweet-alert-popup .swal2-confirm:hover {
    background: #5a67d8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.sweet-alert-popup .swal2-cancel {
    background: #718096 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.sweet-alert-popup .swal2-cancel:hover {
    background: #4a5568 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.4) !important;
}

.sweet-alert-popup .swal2-timer-progress-bar {
    background: #667eea !important;
}

/* Animation pour les alertes de chargement */
.sweet-alert-popup .swal2-loader {
    border-color: #e2e8f0 !important;
    border-top-color: #667eea !important;
}

/* Styles pour les icônes */
.sweet-alert-popup .swal2-icon {
    border: none !important;
}

.sweet-alert-popup .swal2-icon.swal2-success {
    color: #22c55e !important;
}

.sweet-alert-popup .swal2-icon.swal2-error {
    color: #ef4444 !important;
}

.sweet-alert-popup .swal2-icon.swal2-warning {
    color: #f59e0b !important;
}

.sweet-alert-popup .swal2-icon.swal2-info {
    color: #3b82f6 !important;
}

.sweet-alert-popup .swal2-icon.swal2-question {
    color: #8b5cf6 !important;
}

/* Styles spécifiques pour le popup de consentement aux cookies */
.cookie-consent-popup {
    max-width: 600px !important;
    padding: 30px !important;
}

.cookie-consent-popup .swal2-deny {
    background: #ef4444 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    color: white !important;
}

.cookie-consent-popup .swal2-deny:hover {
    background: #dc2626 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

.cookie-consent-popup .swal2-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #334155;
}

.cookie-consent-popup .swal2-footer a {
    color: #667eea;
    text-decoration: underline;
    font-size: 0.85em;
}

/* Styles pour le modal de personnalisation des cookies */
.cookie-customize-container {
    text-align: left;
    padding: 10px 0;
}

.cookie-option-card {
    margin-bottom: 16px;
    padding: 18px 20px;
    border-radius: 12px;
    border: 2px solid #334155;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cookie-option-card.cookie-option-active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
}

.cookie-option-card.cookie-option-active:hover {
    border-color: #60a5fa;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.cookie-option-card.cookie-option-disabled {
    border-color: #475569;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    opacity: 0.7;
}

.cookie-option-card.cookie-option-disabled .cookie-option-label {
    cursor: not-allowed;
}

.cookie-option-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 16px;
    margin: 0;
}

.cookie-checkbox-wrapper {
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-checkbox-custom {
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid #475569;
    border-radius: 6px;
    background: #0f172a;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.cookie-option-active .cookie-checkbox-custom {
    border-color: #3b82f6;
    background: #1e3a5f;
}

.cookie-option-active .cookie-checkbox:checked + .cookie-checkbox-custom,
.cookie-checkbox-custom.cookie-checkbox-checked {
    background: #3b82f6;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.cookie-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cookie-checkbox:checked + .cookie-checkbox-custom::after {
    opacity: 1;
}

.cookie-checkbox:disabled + .cookie-checkbox-custom {
    background: #1e293b;
    border-color: #475569;
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-checkbox:disabled + .cookie-checkbox-custom::after {
    opacity: 1;
    border-color: #94a3b8;
}

.cookie-option-content {
    flex: 1;
}

.cookie-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.cookie-option-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.cookie-option-title {
    color: #e5e7eb;
    font-size: 1rem;
    font-weight: 600;
    display: block;
}

.cookie-option-disabled .cookie-option-title {
    color: #94a3b8;
}

.cookie-option-description {
    font-size: 0.875rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.5;
}

.cookie-option-disabled .cookie-option-description {
    color: #64748b;
}

.cookie-policy-link {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 20px;
    text-align: center;
}

.cookie-policy-link a {
    color: #60a5fa;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-policy-link a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.cookie-consent-popup .swal2-footer a:hover {
    color: #5a67d8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
.navbar { background:#0f172a; color:#fff; position: sticky; top:0; z-index: 50; width:100%; box-sizing:border-box; }
.nav-container { display:flex; align-items:center; justify-content:space-between; padding:8px 24px; width:100%; max-width:none; margin:0; box-sizing:border-box; }
.nav-menu { list-style:none; display:flex; gap:16px; margin:0; padding:0; }
.nav-link { color:#e5e7eb; text-decoration:none; padding:6px 10px; border-radius:6px; line-height:1.5; display:flex; align-items:center; }
.nav-link:hover { background:#1f2937; color:#fff; }
.lang-dropdown { position: relative; }
.lang-dropdown .lang-dropdown-trigger {
  padding: 8px 10px;
  border-radius: 6px;
}
.lang-dropdown .lang-switch-globe {
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  color: #e5e7eb;
  line-height: 1;
}
.lang-dropdown .lang-dropdown-trigger:hover {
  background: #1f2937;
  color: #fff;
}
.lang-dropdown.nav-dropdown.active .lang-dropdown-trigger {
  background: #1e3a5f;
  color: #fff;
}
.lang-dropdown .dropdown-menu.lang-dropdown-menu {
  right: 0;
  left: auto;
  min-width: 158px;
}
.nav-dropdown .dropdown-item.is-active {
  display: flex;
  align-items: center;
  background-color: rgba(37, 99, 235, 0.22);
  color: #f8fafc;
  font-weight: 600;
}
.nav-dropdown .dropdown-item.is-active::before {
  content: "✓";
  margin-right: 8px;
  opacity: 0.85;
  font-weight: 700;
}
.nav-link.active { background:#1e3a5f; color:#fff; }
.btn-login { background:#2563eb; color:#fff; }
.hamburger { display:none; flex-direction:column; gap:4px; cursor:pointer; }
.hamburger .bar { width:24px; height:2px; background:#e5e7eb; }
.hero { background:linear-gradient(135deg,#0f172a, #1e293b); padding:90px 0; }
.hero-container { max-width:1200px; margin:0 auto; padding:0 24px; display:flex; align-items:flex-start; justify-content:space-between; gap:36px; }
.hero-content { flex: 1.1; }
.hero-image { flex: 0.6; display:flex; justify-content:flex-end; }
.hero-title { font-size:64px; line-height:1.05; margin:0 0 18px; letter-spacing:-0.02em; font-weight:800; }
.highlight { color:#2563eb; position:relative; display:inline-block; z-index:0; padding:0 6px; }
.highlight::after { content:""; position:absolute; left:0; right:0; bottom:-8px; height:14px; background:#f2e7c9; border-radius:999px; z-index:-1; pointer-events:none; }
.hero-subtitle { color:#94a3b8; font-size:20px; }
.tech-cards { width:520px; display:flex; flex-direction:column; gap:16px; }
.tech-card { position:relative; display:flex; align-items:center; gap:14px; background:#1e293b; border:1px solid rgba(255,255,255,0.1); border-radius:18px; padding:18px 20px; box-shadow:0 14px 28px rgba(0,0,0,0.3); min-height:72px; }
.tech-card::before { content:""; position:absolute; inset:0; border-radius:18px; box-shadow:0 1px 0 rgba(255,255,255,0.7) inset; pointer-events:none; }
.tech-card:hover { transform: translateY(-2px); box-shadow:0 18px 36px rgba(15,23,42,0.10); }
.tech-icon { width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:#eef2ff; color:#2563eb; font-size:22px; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.15); }
.tech-label { font-weight:700; color:#f1f5f9; font-size:18px; }
.btn { display:inline-block; padding:10px 16px; border-radius:12px; text-decoration:none; margin-right:12px; box-shadow:0 1px 0 rgba(0,0,0,0.02); border:1px solid #475569; background:#334155; color:#f1f5f9; transition:transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { background:#475569; color:#f1f5f9; }
.btn-lg { padding:14px 22px; font-weight:700; }
.btn-primary { background:linear-gradient(180deg,#2f66ff,#1f56ef); color:#fff; box-shadow:0 10px 20px rgba(37,99,235,0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow:0 12px 24px rgba(37,99,235,0.30); }
.btn-secondary { background:#334155; color:#f1f5f9; border-color:#475569; }
.btn-secondary:hover { background:#475569; }
.btn-sky { background:linear-gradient(180deg,#38bdf8,#0ea5e9); color:#fff; box-shadow:0 8px 18px rgba(14,165,233,0.25); }
.btn-sky:hover { transform: translateY(-1px); box-shadow:0 12px 26px rgba(14,165,233,0.35); }
.btn-slate { background:#64748b; color:#fff; }
.btn-slate:hover { background:#475569; }
.btn-emerald { background:#10b981; color:#fff; }
.btn-emerald:hover { background:#059669; }
.container { max-width:1200px; margin:0 auto; padding:0 24px; }
.section-header h2 { margin:48px 0 8px; }
.section-header p { margin:0 0 24px; color:#94a3b8; }
.services-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:16px; }
.services { padding: 40px 0 20px; }
.section-header { text-align:center; }
.service-card { background:#1e293b; border:1px solid #334155; border-radius:20px; padding:26px; transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease; box-shadow:0 12px 28px rgba(0,0,0,0.3); }
.service-card:hover { transform: translateY(-4px); box-shadow:0 20px 40px rgba(2,6,23,0.10); border-color:rgba(37,99,235,0.35); }
.service-card h3 { font-size:26px; margin:10px 0 8px; }
.service-card p { color:#94a3b8; margin:0 0 14px; }
.service-icon { width:64px; height:64px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#eef2ff; color:#2563eb; font-size:26px; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.18); margin-bottom:12px; }
.service-features { list-style:none; padding:0; margin:0; display:grid; gap:6px; color:#94a3b8; }
.service-features li { display:flex; align-items:flex-start; gap:8px; }
.service-features i { color:#f59e0b; margin-top:3px; }

/* Tuile étude de cas : texte + visuel (ex. Nos Réalisations) */
.service-card--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  grid-column: 1 / -1;
}
.service-card--split:hover { transform: translateY(-4px); }
.service-card--split__text {
  padding: 26px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.service-card--split__media {
  position: relative;
  min-height: 240px;
  background: #0f172a;
}
.service-card--split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 768px) {
  .service-card--split {
    grid-template-columns: 1fr;
  }
  .service-card--split__media {
    min-height: 200px;
    order: -1;
  }
}

.support { background: linear-gradient(180deg,#1e293b,#0f172a); padding: 48px 0; }
.support-content { display:grid; grid-template-columns:1.1fr 0.9fr; gap:32px; align-items:center; }
.support-dashboard { background:#1e293b; border:1px solid #334155; border-radius:12px; padding:16px; }
.dashboard-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.status.online { color:#16a34a; font-weight:600; }
.dashboard-stats { display:flex; gap:20px; }
.stat .number { font-weight:700; font-size:20px; }
.contact { padding: 48px 0; }
.contact-content { display:grid; grid-template-columns:1fr 1fr; gap:32px; }
.contact-item { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.contact-item i { font-size:20px; color:#2563eb; }
.contact-item h4 { margin:0; display:inline; }
.contact-item p { margin:2px 0 0; }
.contact-form { background:#1e293b; border:1px solid #334155; border-radius:16px; padding:20px; box-shadow:0 14px 32px rgba(0,0,0,0.3); }
.contact-form .btn { margin-top:8px; }
.contact-form .form-group label .optional-hint { font-weight:400; color:#94a3b8; font-size:0.9em; }
.contact-form .form-group select {
  width:100%;
  padding:0.75rem;
  border:2px solid #e1e8ed;
  border-radius:4px;
  font-size:1rem;
  background:#fff;
  box-sizing:border-box;
}
.contact-form .form-group select:focus { outline:none; border-color:#3498db; }
.auth-container, .dashboard { max-width:380px; margin:60px auto; padding:24px; border:1px solid #334155; border-radius:12px; background:#1e293b; }
.form-group { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
/* Spacing tweaks for login form */
.auth-container .form-group { margin-bottom:20px; }
.auth-container .btn { margin-top:8px; }
input, select, textarea { width:100%; padding:12px; border:0.5px solid #475569 !important; border-radius:10px; background:#0f172a !important; color:#f1f5f9 !important; font-size:15px; }
input:focus, select:focus, textarea:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 4px rgba(37,99,235,0.12); }

/* Styles pour l'icône du calendrier dans les champs de date */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.5);
  cursor: pointer;
  opacity: 0.9;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  filter: invert(1) brightness(2);
}

/* Pour Firefox */
input[type="date"]::-moz-calendar-picker-indicator,
input[type="datetime-local"]::-moz-calendar-picker-indicator {
  filter: invert(1) brightness(1.5);
  cursor: pointer;
  opacity: 0.9;
}

input[type="date"]::-moz-calendar-picker-indicator:hover,
input[type="datetime-local"]::-moz-calendar-picker-indicator:hover {
  opacity: 1;
  filter: invert(1) brightness(2);
}
select { 
  background:#0f172a !important; 
  color:#f1f5f9 !important; 
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 36px !important;
}
select option { background:#0f172a !important; color:#f1f5f9 !important; }
select option:checked { background:#1e293b !important; color:#f1f5f9 !important; }
select option:hover { background:#1e293b !important; color:#f1f5f9 !important; }
/* Autoriser le redimensionnement vertical des zones de texte et enlever tout bouton additionnel */
textarea { resize: vertical; }
.flash { list-style:none; padding:0; }
.flash li { 
    padding:8px 10px; 
    border-radius:8px; 
    margin-bottom:8px; 
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
}
.flash .error { background:#7f1d1d; color:#fca5a5; }
.flash .success { background:#064e3b; color:#6ee7b7; }
.flash .message-text { flex:1; }
.footer { background:#0f172a; color:#9ca3af; padding:32px 0; margin-top:40px; }
.footer .footer-content { display:grid; grid-template-columns: 1.2fr 0.8fr 0.8fr; gap:24px; }
.footer .footer-bottom { text-align:center; }
.footer a { color:#ffffff; text-decoration:none; transition: color .15s ease; }
.footer a:visited { color:#ffffff; }
.footer a:hover { color:#ffffff; opacity:0.8; }
.social-links a { color:#9ca3af; margin-right:10px; transition: color .15s ease; }
.social-links a:hover { color:#ffffff; }

/* Legal page styles */
.legal-page { padding:40px 0; background:#0f172a; min-height:calc(100vh - 200px); }
.legal-content { max-width:800px; margin:0 auto; background:#1e293b; padding:40px; border-radius:12px; box-shadow:0 4px 6px rgba(0,0,0,0.3); }
.legal-content h1 { color:#f1f5f9; font-size:2.5rem; font-weight:700; margin-bottom:20px; text-align:center; }
.legal-content .intro { font-size:1.1rem; color:#94a3b8; margin-bottom:40px; text-align:center; font-style:italic; }
.legal-section { margin-bottom:40px; }
.legal-section h2 { color:#f1f5f9; font-size:1.5rem; font-weight:600; margin-bottom:20px; border-bottom:2px solid #334155; padding-bottom:10px; }
.legal-section h3 { color:#cbd5e1; font-size:1.25rem; font-weight:600; margin:25px 0 15px 0; }
.legal-section p { color:#94a3b8; line-height:1.7; margin-bottom:15px; }
.legal-section ul { margin:15px 0; padding-left:25px; }
.legal-section li { color:#94a3b8; line-height:1.7; margin-bottom:8px; }
.company-info { background:#0f172a; padding:25px; border-radius:8px; border-left:4px solid #3b82f6; }
.company-info p { margin-bottom:8px; }
.company-info strong { color:#f1f5f9; }
.cookie-pref-card {
  margin: 25px 0 35px;
  padding: 20px 24px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #020617);
  border: 1px solid #334155;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
}
.cookie-pref-icon {
  font-size: 28px;
  color: #fbbf24;
  margin-top: 4px;
}
.cookie-pref-body h2 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  color: #e5e7eb;
}
.cookie-pref-body p {
  margin: 0 0 14px 0;
  color: #cbd5e1;
}
.btn-cookie-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: #3b82f6;
  color: #f9fafb;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn-cookie-reset:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.7);
}
.btn-cookie-reset:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.8);
}
.btn-cookie-reset-icon {
  font-size: 1.1rem;
}
@media (max-width: 640px) {
  .cookie-pref-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
.legal-content a { color:#3b82f6; text-decoration:none; }
.legal-content a:hover { text-decoration:underline; }

/* Styles généraux pour les liens - amélioration de la visibilité en mode sombre */
a:not(.btn):not(.nav-link):not(.menu-item):not(.menu-category-header):not(.menu-subitem):not(.stat-card-link):not(.logo a) {
  color: #60a5fa !important;
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:not(.btn):not(.nav-link):not(.menu-item):not(.menu-category-header):not(.menu-subitem):not(.stat-card-link):not(.logo a):hover {
  color: #93c5fd !important;
  text-decoration: underline;
}

a:not(.btn):not(.nav-link):not(.menu-item):not(.menu-category-header):not(.menu-subitem):not(.stat-card-link):not(.logo a):visited {
  color: #818cf8 !important;
}

/* Liens dans les listes - priorité plus élevée */
ul a:not(.btn),
ol a:not(.btn),
.content-section a:not(.btn),
.content-section ul li a:not(.btn),
.content-section ol li a:not(.btn) {
  color: #60a5fa !important;
  text-decoration: underline;
}

ul a:not(.btn):hover,
ol a:not(.btn):hover,
.content-section a:not(.btn):hover,
.content-section ul li a:not(.btn):hover,
.content-section ol li a:not(.btn):hover {
  color: #93c5fd !important;
}

/* Admin styles */
.admin-container { max-width:1200px; margin:40px auto; padding:0 24px; }
.admin-container.full-width { max-width:none; width:100%; margin:24px 0; padding:0 24px; }
.admin-tabs { display:flex; gap:0; margin:24px 0; border-bottom:1px solid #334155; }
.tab-button { background:none; border:none; padding:12px 20px; cursor:pointer; border-radius:8px 8px 0 0; color:#94a3b8; font-weight:500; transition:all .2s ease; position:relative; }
.tab-button.active { background:#1e293b; color:#60a5fa; border:1px solid #334155; border-bottom:1px solid #1e293b; }
.tab-button:hover:not(.active) { background:#0f172a; color:#cbd5e1; }
.tab-content { display:none; padding:24px 0; }
.tab-content.active { display:block; }
.admin-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:20px; }
.card { background:#1e293b; border:1px solid #334155; border-radius:8px; box-shadow:0 2px 4px rgba(0,0,0,0.3); }
.card h2, .card h3 { color:#f1f5f9; }
.admin-card { background:#1e293b; border:1px solid #334155; border-radius:12px; padding:20px; box-shadow:0 4px 6px rgba(0,0,0,0.3); }
.admin-card h3 { margin:0 0 16px; color:#f1f5f9; }
.stat-item { display:flex; align-items:center; gap:12px; margin-bottom:8px; }
.stat-number { font-size:24px; font-weight:700; color:#2563eb; }
.stat-label { color:#94a3b8; }
.list-item { display:flex; align-items:center; gap:12px; padding:8px 0; border-bottom:1px solid #334155; }
.list-item:last-child { border-bottom:none; }
.username { font-weight:500; color:#f1f5f9; }
.role { padding:2px 8px; border-radius:12px; font-size:12px; font-weight:500; }
.role-admin { background:#fef3c7; color:#92400e; }
.role-user { background:#dbeafe; color:#1e40af; }
.role-client { background:#d1fae5; color:#065f46; }
.date { color:#94a3b8; font-size:14px; margin-left:auto; }
.message-item { padding:12px 0; border-bottom:1px solid #334155; }
.message-item:last-child { border-bottom:none; }
.message-item.unread { background:#fef3c7; border-radius:8px; padding:16px; margin-bottom:8px; border:1px solid #f59e0b; }
.message-header { display:flex; align-items:center; gap:12px; margin-bottom:4px; }
.message-name { font-weight:500; color:#f1f5f9; }
.message-service { background:#475569; color:#cbd5e1; padding:2px 6px; border-radius:4px; font-size:12px; }
.message-date { color:#6b7280; font-size:14px; margin-left:auto; }
.message-email { color:#94a3b8; font-size:14px; }
.message-actions { margin-top:8px; }
.message-content { margin-top:12px; }
.message-text { 
    background:#0f172a; 
    border:1px solid #334155; 
    border-radius:6px; 
    padding:12px; 
    margin-top:6px; 
    color:#cbd5e1; 
    line-height:1.5; 
    white-space:pre-wrap; 
}
.btn-delete { background:#dc2626; color:white; border:none; padding:4px 8px; border-radius:4px; font-size:12px; cursor:pointer; }
.btn-delete:hover { background:#b91c1c; }
.btn-read { background:#059669; color:white; border:none; padding:4px 8px; border-radius:4px; font-size:12px; cursor:pointer; margin-right:8px; }
.btn-read:hover { background:#047857; }
.message-status { margin-left:auto; margin-right:12px; }
.status-read { color:#059669; font-size:12px; font-weight:500; }
.status-unread { color:#dc2626; font-size:12px; font-weight:500; }

/* Project description */
.project-description { 
    background:#0f172a; 
    border:1px solid #334155; 
    border-radius:8px; 
    padding:16px; 
    margin-bottom:20px; 
}
.project-description h4 { 
    color:#60a5fa; 
    margin:0 0 12px 0; 
    font-size:16px; 
    font-weight:600; 
}
.project-description p { 
    margin:8px 0; 
    color:#94a3b8; 
    font-size:14px; 
    line-height:1.5; 
}

/* Notification badge */
.notification-badge { 
    position:absolute; 
    top:-8px; 
    right:-8px; 
    background:#dc2626; 
    color:white; 
    border-radius:50%; 
    width:20px; 
    height:20px; 
    font-size:12px; 
    display:flex; 
    align-items:center; 
    justify-content:center; 
    font-weight:bold; 
}

/* SMTP form styles */
.admin-card form { max-width:600px; }
.admin-card .form-group { margin-bottom:16px; }
.admin-card label { display:block; margin-bottom:4px; font-weight:500; color:#cbd5e1; }
.admin-card input[type="checkbox"] { margin-right:8px; }
.admin-card .form-buttons { display:flex; gap:12px; margin-top:20px; }
.admin-card .btn-secondary { background:#6b7280; color:white; border:none; }
.admin-card .btn-secondary:hover { background:#4b5563; }

/* Header layout: title left, actions right */
.admin-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.admin-header h1 { margin:0; }
.header-actions .btn { margin-left:10px; }

/* Readability for tables */
.admin-table { width:100%; border-collapse:separate; border-spacing:0; }
.admin-table th, .admin-table td { padding:8px 10px; }

/* Ribbon steps for BIA */
.steps-ribbon { display:flex; gap:12px; margin:12px 0 22px; }
.steps-ribbon .step { flex:1 1 0; color:#fff; text-align:center; padding:12px 10px; border-radius:10px; font-weight:700; line-height:1.2; box-shadow:0 6px 16px rgba(0,0,0,0.12); }
.steps-ribbon .step span { font-weight:500; opacity:.95; }
.steps-ribbon .step:nth-child(1){ background:linear-gradient(135deg,#2a6df6 0%, #2455d6 100%); }
.steps-ribbon .step:nth-child(2){ background:linear-gradient(135deg,#7b3cf0 0%, #b13ee3 100%); }
.steps-ribbon .step:nth-child(3){ background:linear-gradient(135deg,#ff5c93 0%, #ff3d6e 100%); }
.steps-ribbon .step:nth-child(4){ background:linear-gradient(135deg,#f6a400 0%, #d88a00 100%); }
.steps-ribbon .step.step-active { outline:3px solid rgba(255,255,255,0.35); }

/* Badges for tags/types/codes */
.tag-badge { display:inline-block; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:600; line-height:1; border:1px solid rgba(0,0,0,0.06); }
.type-database, .type_base_de_données { background:#fde68a; color:#7c2d12; }
.type-saas { background:#bfdbfe; color:#1e3a8a; }
.type-web, .type-application_web { background:#d1fae5; color:#065f46; }
.type-middleware { background:#fee2e2; color:#7f1d1d; }
.type-service { background:#e0e7ff; color:#3730a3; }
.type-queue { background:#fbcfe8; color:#831843; }
.type-storage { background:#475569; color:#cbd5e1; }
.type-other, .type_autre { background:#334155; color:#cbd5e1; }

.code-badge { display:inline-block; padding:2px 8px; border-radius:6px; font-size:12px; background:#0f172a; color:#f1f5f9; border:1px solid #334155; }

/* Table readability tweaks */
.admin-table thead th { background:#0f172a; border-bottom:1px solid #334155; text-align:left; color:#f1f5f9; }
.admin-table tbody tr {
    background: #0f172ace; /* Fond sombre pour lignes impaires */
    color:#f1f5f9;
}
.admin-table tbody tr:nth-child(even) {
    background:#1e293b !important; /* Fond légèrement plus clair pour lignes paires */
}
.admin-table tbody td { color:#cbd5e1; }

/* Heading link that keeps text color */
.heading-link { color: inherit; text-decoration: none; }
.heading-link:visited { color: inherit; }
.heading-link:hover { text-decoration: underline; }

/* Compact form rows: label close to control */
.content-body .form-row { display:grid; grid-template-columns: 220px 1fr; align-items:center; gap:12px; margin-bottom:12px; }
.content-body .form-row label { margin:0; font-weight:600; color:#f1f5f9; }
.content-body .form-actions { display:flex; gap:12px; margin-top:16px; }

/* Users table styles */
.users-table-container { overflow-x:auto; margin-top:20px; }
.users-table { width:100%; border-collapse:collapse; background:#1e293b; border-radius:8px; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,0.3); }
.users-table th { background:#0f172a; padding:12px; text-align:left; font-weight:600; color:#f1f5f9; border-bottom:1px solid #334155; }
.users-table td { padding:12px; border-bottom:1px solid #334155; color:#cbd5e1; }
.users-table tbody tr {
    background: transparent; /* Fond de base pour lignes impaires (hérite de #1e293b) */
}
.users-table tbody tr:nth-child(even) {
    background: #334155; /* Fond légèrement plus clair pour lignes paires */
}
.users-table tr:hover { background:#334155; }
.address-cell { max-width:200px; word-wrap:break-word; }
.actions-cell { white-space:nowrap; }
.btn-edit { background:#3b82f6; color:white; border:none; padding:4px 8px; border-radius:4px; font-size:12px; cursor:pointer; margin-right:4px; }
.btn-edit:hover { background:#2563eb; }
.btn-verify { background:#059669; color:white; border:none; padding:4px 8px; border-radius:4px; font-size:12px; cursor:pointer; margin-right:4px; }
.btn-verify:hover { background:#047857; }
.status-verified { color:#059669; font-size:12px; font-weight:500; }
.status-unverified { color:#dc2626; font-size:12px; font-weight:500; }
.status-active { color:#059669; font-size:12px; font-weight:500; }
.status-inactive { color:#dc2626; font-size:12px; font-weight:500; }

/* Modal styles */
.modal { display:none; position:fixed; z-index:1000; left:0; top:0; width:100%; height:100%; background-color:rgba(0,0,0,0.5); }
.modal-content { 
    background-color:#1e293b; 
    margin:2% auto; 
    padding:30px; 
    border:1px solid #334155; 
    border-radius:12px; 
    width:90%; 
    max-width:700px; 
    max-height:90vh; 
    overflow-y:auto; 
    box-shadow:0 10px 25px rgba(0,0,0,0.5);
    color:#f1f5f9;
}
.close { 
    color:#94a3b8; 
    float:right; 
    font-size:24px; 
    font-weight:bold; 
    cursor:pointer; 
    margin-top:-10px;
    margin-right:-5px;
}
.close:hover { color:#cbd5e1; }

/* Modal form styles */
.modal-content h3 { 
    margin:0 0 20px 0; 
    color:#f1f5f9; 
    font-size:20px; 
    font-weight:600; 
    border-bottom:2px solid #334155; 
    padding-bottom:10px; 
}
.modal-content .form-group { 
    margin-bottom:20px; 
    display:flex; 
    align-items:center; 
    gap:15px; 
}
.modal-content .form-group label { 
    min-width:120px; 
    font-weight:500; 
    color:#374151; 
    margin:0; 
}
.modal-content .form-group input, 
.modal-content .form-group select, 
.modal-content .form-group textarea { 
    flex:1; 
    padding:8px 12px; 
    border:1px solid #d1d5db; 
    border-radius:6px; 
    font-size:14px; 
}
.modal-content .form-group input[type="checkbox"] { 
    flex:none; 
    width:18px; 
    height:18px; 
    margin:0; 
}
.modal-content .form-buttons { 
    display:flex; 
    gap:12px; 
    margin-top:30px; 
    justify-content:flex-end; 
}

/* Admin form checkbox styles */
.admin-card .form-group.checkbox-group { 
    display:flex; 
    align-items:center; 
    gap:12px; 
    margin-bottom:20px; 
}
.admin-card .form-group.checkbox-group label { 
    display:flex; 
    align-items:center; 
    gap:8px; 
    font-weight:500; 
    color:#374151; 
    cursor:pointer; 
    margin:0; 
    min-width:auto; 
}
.admin-card .form-group.checkbox-group input[type="checkbox"] { 
    width:18px; 
    height:18px; 
    margin:0; 
    cursor:pointer; 
    accent-color:#3b82f6; 
}

/* Flash message styles for admin */
.flash-message { 
    padding:12px 16px; 
    margin-bottom:20px; 
    border-radius:6px; 
    font-weight:500; 
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
}
.flash-message.success { 
    background:#d1fae5; 
    color:#065f46; 
    border:1px solid #a7f3d0; 
}
.flash-message.error { 
    background:#fee2e2; 
    color:#991b1b; 
    border:1px solid #fca5a5; 
}
.close-message { 
    cursor:pointer; 
    font-size:18px; 
    font-weight:bold; 
    margin-left:10px; 
    opacity:0.7; 
}
.close-message:hover { 
    opacity:1; 
}
.message-text { 
    flex:1; 
}

@media (max-width: 800px) {
  .nav-menu { position: absolute; right: 16px; top: 56px; background:#0f172a; flex-direction:column; gap:8px; padding:12px; border-radius:8px; display:none; }
  .nav-menu.open { display:flex; }
  .hamburger { display:flex; }
  .hero-container { flex-direction:column; }
  .hero-image { justify-content:stretch; width:100%; }
  .hero-title { font-size:36px; }
  .highlight::after { height:8px; bottom:-4px; }
  .tech-cards { width:100%; }
  .contact-content, .support-content { grid-template-columns:1fr; }
  .footer .footer-content { grid-template-columns:1fr; }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #f1f5f9;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e8ed;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.btn-secondary:hover {
  background-color: #94a3b8;
}

/* Account Settings Styles */
.account-settings-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: #1e293b;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.account-settings-container h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #f1f5f9;
  font-size: 2rem;
}

.form-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e1e8ed;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 2rem;
}

.form-section h2 {
  color: #f1f5f9;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.section-description {
  color: #94a3b8;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.form-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Variante: 2 colonnes égales */
.form-row.two-cols {
  grid-template-columns: 1fr 1fr;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #f1f5f9;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e8ed;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e1e8ed;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .account-settings-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* Dashboard user name link */
.dashboard h2 a {
  color: #3498db !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
}

.dashboard h2 a:hover {
  color: #2980b9 !important;
  text-decoration: underline !important;
}

/* Navigation Dropdown Menu */
.nav-item.nav-dropdown {
  position: relative;
}

.nav-dropdown .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-dropdown .dropdown-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
  margin-left: 4px;
}

.nav-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  list-style: none;
  margin: 8px 0 0 0;
  padding: 4px 0;
}

.nav-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown .dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.nav-dropdown .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
}

/* User Dropdown in Navigation */
.nav-item.user-dropdown {
  position: relative;
  margin-left: auto;
  margin-right: 16px;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  line-height: 1.5;
}

.user-trigger:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-trigger .user-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  height: 16px;
  width: 16px;
}

.user-trigger .user-icon svg {
  display: block;
  vertical-align: middle;
}

.user-trigger .user-name {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 14px;
}

.dropdown-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  height: 12px;
  width: 12px;
  transition: transform 0.2s ease;
}

.user-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  min-width: 180px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-dropdown.active .user-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu .menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #374151;
}

.user-menu .menu-item:last-child {
  border-bottom: none;
}

.user-menu .menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
}

.user-menu .menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  height: 16px;
  width: 16px;
}

.user-menu .menu-icon svg {
  display: block;
}

/* ===== SUPPORT SYSTEM STYLES ===== */

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #1e293b;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Effet hover pour les tuiles interactives */
a.stat-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

a.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  background-color: #0f172a;
}

a.stat-card:hover .stat-icon {
  background: #0f172a !important; /* Rond prend la même couleur que le fond de la tuile au survol */
}

.stat-alert {
  background:#7f1d1d; /* rouge sombre pour mode sombre */
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
  border:1px solid #991b1b;
}

/* Gestion du survol des tuiles en alerte */
.stat-alert .stat-icon {
  background: #7f1d1d; /* Même couleur que le fond de la tuile en alerte */
}

a.stat-card.stat-alert:hover {
  background-color: #0f172a !important; /* Gris au survol, comme les autres tuiles */
  border-color: #991b1b; /* Bordure reste rouge */
}

a.stat-card.stat-alert:hover .stat-icon {
  background: #0f172a !important; /* Rond passe au gris au survol */
}

/* Styles pour la page de statistiques */
.stats-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  background: #1e293b;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stats-tabs .tab-button {
  flex: 1;
  padding: 12px 20px;
  text-align: center;
  text-decoration: none;
  color: #6b7280;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.stats-tabs .tab-button:hover {
  background: #334155;
  color: #cbd5e1;
}

.stats-tabs .tab-button.active {
  background: #2563eb;
  color: #fff;
}

.stats-filters {
  background: #1e293b;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.date-filter-form {
  display: flex;
  align-items: end;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-weight: 600;
  color: #cbd5e1;
  font-size: 14px;
}

.filter-group input {
  padding: 8px 12px;
  border: 1px solid #475569;
  border-radius: 6px;
  font-size: 14px;
  background: #0f172a;
  color: #f1f5f9;
}

.stats-overview {
  margin-bottom: 30px;
}

.stats-overview h2 {
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 24px;
}

.charts-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.chart-card {
  background: #1e293b;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chart-card h3 {
  margin: 0 0 20px 0;
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 20px;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: #cbd5e1;
}

.legend-value {
  font-weight: 600;
  color: #1f2937;
}

/* Responsive pour les graphiques */
@media (max-width: 768px) {
  .chart-row {
    grid-template-columns: 1fr;
  }
  
  .date-filter-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
  }
}

.stat-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  border-radius: 50%;
}

.stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 5px 0;
}

.stat-content p {
  color: #94a3b8;
  margin: 0;
  font-size: 0.9rem;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 15px;
}

/* Priority and Status Badges */
.priority-badge, .status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-low {
  background: #d1fae5;
  color: #065f46;
}

.priority-medium {
  background: #fef3c7;
  color: #92400e;
}

.priority-high {
  background: #fed7aa;
  color: #9a3412;
}

.priority-critical {
  background: #fecaca;
  color: #991b1b;
}

.status-new {
  background: #e0e7ff;
  color: #3730a3;
}

.status-open {
  background: #dbeafe;
  color: #1e40af;
}

.status-in_progress {
  background: #fef3c7;
  color: #92400e;
}

.status-pending {
  background: #f3e8ff;
  color: #7c3aed;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.status-maintenance {
  background: #78350f;
  color: #fcd34d;
}

.status-retired {
  background: #d1ecf1;
  color: #0c5460;
}

.status-expired {
  background: #f5c6cb;
  color: #721c24;
}

.status-resolved {
  background: #d1fae5;
  color: #065f46;
}

.status-closed {
  background: #334155;
  color: #cbd5e1;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-inactive {
  background: #fecaca;
  color: #991b1b;
}

/* Filter Form */
.filter-form {
  background: #0f172a;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  align-items: end;
}

.filter-grid .form-group {
  margin-bottom: 0;
}

/* No Data Message */
.no-data {
  text-align: center;
  color: #94a3b8;
  font-style: italic;
  padding: 40px;
  background: #0f172a;
  border-radius: 8px;
  border: 2px dashed #475569;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Form Container */
.form-container {
  background: #1e293b;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* Variante: 2 colonnes égales dans les sections de contenu */
.content-body .form-row.two-cols {
  grid-template-columns: 1fr 1fr;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #cbd5e1;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid #475569 !important;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 36px !important;
  background-color: #0f172a !important;
}

select.form-control option {
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

select.form-control option:checked {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

select.form-control option:hover {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

.form-control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control[type="textarea"] {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-start;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #334155;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #475569;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  background: #334155;
  color: #f1f5f9;
}

.btn:hover {
  background: #475569;
  color: #f1f5f9;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  color: white;
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
  color: white;
}

.btn-outline {
  background: transparent;
  color: #6b7280;
  border: 1px solid #475569;
}

.btn-outline:hover {
  background: #1e293b;
  color: #cbd5e1;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Type Badges for Contracts and Assets */
.type-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.type-support {
  background: #dbeafe;
  color: #1e40af;
}

.type-maintenance {
  background: #fef3c7;
  color: #92400e;
}

.type-development {
  background: #d1fae5;
  color: #065f46;
}

.type-consulting {
  background: #f3e8ff;
  color: #7c3aed;
}

.type-server {
  background: #dbeafe; /* bleu pâle */
  color: #1e40af;
}

.type-workstation {
  background: #dbeafe;
  color: #1e40af;
}

.type-network {
  background: #d1fae5;
  color: #065f46;
}

.type-software {
  background: #fef3c7;
  color: #92400e;
}

.type-other {
  background: #334155;
  color: #cbd5e1;
}

/* ===== SIDEBAR LAYOUT ===== */
.app-container {
    display: flex;
    min-height: 100vh;
    background: #0f172a;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.sidebar-search {
    padding: 15px 20px;
    border-bottom: 1px solid #34495e;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #34495e;
    border-radius: 4px;
    background: #34495e;
    color: white;
    font-size: 14px;
}

.search-input::placeholder {
    color: #bdc3c7;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    background: #34495e;
}

.sidebar-menu {
    flex: 1;
    padding: 10px 0;
}

.menu-section {
    margin-bottom: 5px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: #34495e;
    border-left-color: #3498db;
}

.menu-item.active {
    background: #3498db;
    border-left-color: #2980b9;
}

.menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.menu-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.menu-category {
    border-bottom: 1px solid #34495e;
}

.menu-category-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

/* Ensure link-style headers like "Aide" appear like other headers */
a.menu-category-header {
    color: #ecf0f1;
    text-decoration: none;
}
a.menu-category-header:hover {
    color: #ffffff;
    text-decoration: none;
}

.menu-category-header:hover {
    background: #34495e;
    border-left-color: #3498db;
}

.menu-category.expanded .menu-category-header {
    background: #34495e;
    border-left-color: #3498db;
}

.menu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-category.expanded .menu-arrow {
    transform: rotate(180deg);
}

.menu-subitems {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #1a252f;
}

.menu-category.expanded .menu-subitems {
    max-height: 500px;
}

.menu-subitem {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 50px;
    color: #bdc3c7;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 13px;
}

.menu-subitem:hover {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
    text-decoration: none !important;
}

.menu-subitem.active {
    background: #60a5fa !important;
    color: white !important;
    border-left-color: #3b82f6 !important;
    text-decoration: none !important;
    font-weight: 500;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #34495e;
    background: #1a252f;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon {
    font-size: 18px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.user-role {
    font-size: 12px;
    color: #bdc3c7;
}

.user-actions {
    display: flex;
    gap: 5px;
}

.logout-btn {
    color: #e74c3c;
    text-decoration: none;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.2);
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 0;
    background: #0f172a;
    min-height: 100vh;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: #2c3e50;
        color: white;
        border: none;
        padding: 10px;
        border-radius: 4px;
        cursor: pointer;
    }
}

.mobile-menu-toggle {
    display: none;
}

/* Content styles */
.content-header {
    background: #1e293b;
    padding: 20px 30px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-title h1 {
    margin: 0;
    font-size: 28px;
    color: #f1f5f9;
    font-weight: 600;
}

.content-title p {
    margin: 5px 0 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.content-actions {
    display: flex;
    gap: 10px;
}

.content-body {
    padding: 30px;
    background: #0f172a;
}

.content-section {
    background: #1e293b;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    overflow: hidden;
}

.content-section h2 {
    margin: 0;
    padding: 20px 30px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    font-size: 18px;
    color: #f1f5f9;
    font-weight: 600;
}

.content-section .action-buttons {
    padding: 20px 30px;
}

/* ===== Planning calendar ===== */
.calendar-toolbar { display:flex; justify-content:space-between; align-items:center; padding:12px 20px; gap:12px; }
.calendar-month { padding: 10px 20px 20px; }
.calendar-header { display:grid; grid-template-columns: repeat(7, 1fr); gap:8px; padding-bottom:8px; color:#94a3b8; font-weight:600; }
.calendar-weeks { display:grid; grid-template-rows: repeat(6, minmax(100px, auto)); gap:8px; }
.calendar-week { display:grid; grid-template-columns: repeat(7, 1fr); gap:8px; }
.calendar-day { background:#1e293b; border:1px solid #334155; border-radius:6px; min-height:110px; padding:6px; display:flex; flex-direction:column; }
.calendar-day.empty { background:#0f172a; border:1px dashed #334155; }
.day-number { font-size:12px; color:#94a3b8; margin-bottom:6px; }
.day-items { display:flex; flex-direction:column; gap:4px; overflow:hidden; }
.calendar-item { display:flex; align-items:center; gap:6px; font-size:12px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dot { width:8px; height:8px; border-radius:50%; background:#9ca3af; flex:none; }
.priority-low .dot, .dot.priority-low { background:#10b981; }
.priority-medium .dot, .dot.priority-medium { background:#f59e0b; }
.priority-high .dot, .dot.priority-high { background:#ef4444; }
.priority-critical .dot, .dot.priority-critical { background:#dc2626; }
.filter-types { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.checkbox-inline { display:flex; align-items:center; gap:6px; }

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #0f172ae8;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #f1f5f9;
    border-bottom: 1px solid #334155;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #334155;
    vertical-align: middle;
}
.data-table td .table-actions .btn { white-space: nowrap; }

.data-table tbody tr {
    background: #0f172a; /* Fond sombre pour lignes impaires */
}

.data-table tbody tr:nth-child(even) {
    background: #1e293b; /* Fond légèrement plus clair pour lignes paires */
}

.data-table tbody tr:hover {
    background: #0f172a;
}

.data-table tbody tr.current-user {
    background-color: #064e3b; /* Vert sombre pour mode sombre */
    color: #6ee7b7; /* Texte vert clair pour lisibilité */
}

.data-table tbody tr.current-user td {
    color: #6ee7b7; /* Texte vert clair pour toutes les cellules */
}

/* Permission badges */
.perm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.perm-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
}

.perm-badge.add {
    background-color: #16a34a; /* green */
}

.perm-badge.edit {
    background-color: #f59e0b; /* amber */
}

.perm-badge.delete {
    background-color: #dc2626; /* red */
}

.perm-badge.other {
    background-color: #334155; /* slate */
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Admin tabs */
.admin-tabs {
    display: flex;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    margin-bottom: 0;
}

.tab-button {
    padding: 15px 25px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    color: #f1f5f9;
    background: #0f172a;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #0f172a;
}

.unread-count {
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    margin-left: 5px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Flash messages */
.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.flash-message.success {
    background: #27ae60;
}

.flash-message.error {
    background: #e74c3c;
}

.close-message {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    opacity: 0.8;
}

.close-message:hover {
    opacity: 1;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #f1f5f9;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #3498db;
    border-color: #3498db;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}


/* Toggle switch (for Actif) */
.toggle {
  display:flex;
  align-items:center;
  gap:10px;
}

.toggle .toggle-label { font-weight:600; color:#2c3e50; }

.toggle-switch {
  position: relative;
  width: 46px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #475569;
  border-radius: 999px;
  transition: background-color .2s ease;
  border:1px solid #d1d5db;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  left: 3px; top: 50%; transform: translateY(-50%);
  background-color: #1e293b;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: transform .2s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #2563eb;
  border-color:#1d4ed8;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translate(20px, -50%);
}

/* ===== PRI PAGES STYLES ===== */
/* Styles spécifiques pour améliorer le look des pages PRI */
.panel {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid #334155;
  background: #0f172a;
  border-radius: 8px 8px 0 0;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
}

.panel-body {
  padding: 20px;
}

/* Amélioration de l'espacement des formulaires PRI */
.panel-body .form-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.panel-body .form-row label {
  margin: 0;
  padding-top: 10px;
  font-weight: 600;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

.panel-body .form-row input,
.panel-body .form-row select,
.panel-body .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid #475569 !important;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

.panel-body .form-row select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 36px !important;
  background-color: #0f172a !important;
}

.panel-body .form-row select option {
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

.panel-body .form-row select option:checked {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

.panel-body .form-row select option:hover {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

.panel-body .form-row input:focus,
.panel-body .form-row select:focus,
.panel-body .form-row textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.panel-body .form-row textarea {
  resize: vertical;
  min-height: 80px;
}

/* Form-row inline (pour les champs côte à côte) */
.panel-body .form-row.inline {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.panel-body .form-row.inline > div {
  display: flex;
  flex-direction: column;
}

.panel-body .form-row.inline > div label {
  margin-bottom: 6px;
  padding-top: 0;
}

.panel-body .form-row small {
  grid-column: 2;
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

/* Form actions dans les panels */
.panel-body .form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #334155;
}

/* Responsive pour les formulaires PRI */
@media (max-width: 768px) {
  .panel-body .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .panel-body .form-row label {
    padding-top: 0;
    margin-bottom: 4px;
  }
  
  .panel-body .form-row small {
    grid-column: 1;
  }
  
  .panel-body .form-row.inline {
    grid-template-columns: 1fr;
  }
}

/* ===== VPAP APPS EDIT STYLES ===== */
/* Styles pour les chips (tags) */
.chips{ display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
.chip{ background:#334155; border-radius:16px; padding:4px 8px; display:inline-flex; align-items:center; gap:6px; color:#cbd5e1; }
.chip-close{ background:transparent; border:0; cursor:pointer; color:#94a3b8; font-size:18px; line-height:1; padding:0; width:18px; height:18px; display:flex; align-items:center; justify-content:center; }
.chip-close:hover{ color:#f1f5f9; }
.suggest{ position:absolute; background:#1e293b; border:1px solid #334155; border-radius:6px; padding:4px; margin-top:2px; max-height:220px; overflow:auto; width:360px; z-index:10; box-shadow:0 4px 6px rgba(0,0,0,0.3); }
.suggest a{ display:block; padding:6px 8px; text-decoration:none; color:#cbd5e1; }
.suggest a:hover{ background:#334155; color:#f1f5f9; }

/* Styles pour les dépendances architecturales */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9em;
  color: #cbd5e1;
}

.checkbox-item:hover {
  background: #1e293b;
  border-color: #475569;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
  transform: scale(1.1);
}

.checkbox-item input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: #f1f5f9;
}

.checkbox-item:has(input[type="checkbox"]:checked) {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #f1f5f9;
}

/* Mise en forme alignée des questions/checkbox dans Protection */
.prot-grid{ display:grid; grid-template-columns: 1fr max-content; align-items:center; gap:6px 12px; width:max-content; }
.prot-q{ white-space:nowrap; }
.prot-c input[type="checkbox"]{ margin:0; }

/* Styles pour l'alerte SweetAlert2 personnalisée */
.swal2-popup-custom {
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  background: #1e293b !important;
}

.swal2-title-custom {
  color: #f1f5f9 !important;
  font-size: 1.5em;
  font-weight: 700;
}

.swal2-content-custom {
  color: #cbd5e1 !important;
  font-size: 1em;
  line-height: 1.6;
}

/* Styles pour les formulaires dans les modales SweetAlert2 */
.swal2-popup input,
.swal2-popup select,
.swal2-popup textarea {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border: 0.5px solid #475569 !important;
}

.swal2-popup label {
  color: #cbd5e1 !important;
}

.swal2-popup .form-control {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border: 0.5px solid #475569 !important;
}

/* Styles pour l'éditeur Quill */
.rte { 
  min-height: 150px; 
  border: 1px solid #475569; 
  border-radius: 6px; 
  background: #1e293b; 
  resize: vertical; 
  overflow: auto; 
}

.rte:focus-within { 
  outline: none; 
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); 
  border-color: #2563eb;
}

/* S'assurer que le wrapper dans form-row prend toute la largeur */
.content-body .form-row > div {
  width: 100%;
}

/* Styles pour les champs select dans content-body */
.content-body .form-row select,
.content-body select {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 36px !important;
  background-color: #0f172a !important;
}

/* ===== PREFERENCES PAGE STYLES ===== */
/* Styles pour la page des préférences */
.preferences-description {
  color: #94a3b8;
  margin-bottom: 20px;
  font-size: 14px;
}

.preferences-form-group {
  flex: 1 1 300px;
}

.preferences-form-group-full {
  flex: 1 1 100%;
}

.preferences-help-text {
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.preferences-info-box {
  margin-top: 16px;
  padding: 12px;
  background: #1e293b;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}

.preferences-info-text {
  color: #cbd5e1;
  font-size: 13px;
}

.preferences-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  background: #1e293b;
  border-radius: 6px;
  border: 1px solid #334155;
  transition: border-color 0.2s;
}

.preferences-checkbox-label:hover {
  border-color: #475569;
}

.preferences-checkbox-input {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.preferences-checkbox-title {
  color: #f1f5f9;
  font-weight: 500;
  margin-bottom: 4px;
}

.preferences-checkbox-description {
  color: #94a3b8;
  font-size: 13px;
}

.preferences-form-actions {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #334155;
}

/* ===== NOTIFICATIONS PAGE STYLES ===== */
/* Styles pour la page des notifications */
.notifications-count {
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notification-item {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
}

.notification-item:hover {
  border-color: #475569;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.notification-content {
  flex: 1;
}

.notification-title {
  margin: 0 0 8px 0;
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
}

.notification-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.notification-meta-item {
  color: #94a3b8;
  font-size: 13px;
}

.notification-actions {
  margin-left: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.notification-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: white;
}

.notification-status-sent {
  background: #10b981;
}

.notification-status-failed {
  background: #ef4444;
}

.notification-status-default {
  background: #64748b;
}

.notification-delete-btn {
  background: #dc2626;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.notification-delete-btn:hover {
  background: #b91c1c;
}

.notification-body {
  background: #0f172a;
  border-radius: 6px;
  padding: 16px;
  margin-top: 12px;
  border: 1px solid #1e293b;
}

.notification-body-content {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
}

.notification-error {
  background: #7f1d1d;
  border: 1px solid #991b1b;
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
}

.notification-error-text {
  color: #fca5a5;
  font-size: 13px;
}

.notifications-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.notifications-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.notifications-empty-title {
  color: #cbd5e1;
  margin-bottom: 8px;
}

/* ===== PCA PAGE STYLES ===== */
/* Styles pour la page PCA */
.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.choice input[type="radio"],
.choice input[type="checkbox"] {
  margin: 0;
}

.subpanel h5 {
  margin-top: 12px;
}

details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details[open] > summary::after {
  content: '\25B2';
  float: right;
}

details > summary::after {
  content: '\25BC';
  float: right;
}

details {
  padding: 8px 12px;
  border: 1px solid #334155;
  border-radius: 6px;
}

details + details {
  margin-top: 8px;
}

.kv-table {
  width: auto;
  border-collapse: collapse;
  margin: 6px 0;
}

.kv-table td {
  padding: 6px 8px;
  vertical-align: middle;
  border: 0;
}

.kv-table td.input-cell {
  width: 28px;
  text-align: left;
}

.kv-table input[type="checkbox"],
.kv-table input[type="radio"] {
  transform: translateY(1px);
}

/* Onglets PCA */
.tabs {
  border-bottom: 2px solid #475569;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  background: #1e293b;
  padding: 8px 8px 0 8px;
  border-radius: 6px 6px 0 0;
}

.tab-btn {
  padding: 10px 16px;
  border: 1px solid #475569;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #0f172a;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  top: 2px;
}

.tab-btn:hover {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #64748b;
}

.tab-btn.active {
  background: #334155;
  color: #ffffff;
  font-weight: 600;
  border-color: #64748b;
  border-bottom: 2px solid #334155;
  top: 0;
  margin-bottom: -2px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.tab-panel {
  display: none;
  padding-top: 12px;
}

.tab-panel.active {
  display: block;
}

.gap-row {
  background: #78350f;
}

.gap-summary {
  font-size: 0.95em;
  color: #cbd5e1;
}

/* Matrice - couleurs de sévérité */
.sev-badge {
  padding: 2px 6px;
  border-radius: 4px;
  color: #111827;
  display: inline-block;
}

.sev-critical {
  background: #fecaca;
}

.sev-high {
  background: #fde68a;
}

.sev-medium {
  background: #d9f99d;
}

.sev-low {
  background: #e5e7eb;
}

.matrix-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  flex-wrap: wrap;
}

.matrix-controls select {
  padding: 4px 6px;
}

/* Modal PCA */
.pca-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.pca-modal {
  background: #1e293b;
  border-radius: 8px;
  width: 640px;
  max-width: 95vw;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: block;
}

.pca-modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pca-modal-title {
  font-weight: 600;
}

.pca-modal-body {
  padding: 12px 16px;
  max-height: 65vh;
  overflow: auto;
}

.pca-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #334155;
  text-align: right;
}

.btn-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* ===== SUPPORT INFORMATIONS PAGE STYLES ===== */
/* Réduire l'espacement vertical des lignes du tableau des informations */
#informations-list .admin-table th,
#informations-list .admin-table td {
  padding-top: 8px;
  padding-bottom: 8px;
}

#informations-list .admin-table tr {
  height: auto;
}

#informations-list .admin-table td > .btn {
  margin: 0;
}

/* Alignement horizontal des boutons d'action */
#informations-list .admin-table td:last-child {
  white-space: nowrap;
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  align-items: center;
}

.filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
  max-width: 50%;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #1e293b;
  flex: 1;
  max-width: 200px;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  flex: 1;
  max-width: 200px;
}

.important-filter {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 0.75em;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 4px;
}

.badge-primary {
  background-color: #007bff;
  color: white;
}

.badge-secondary {
  background-color: #6c757d;
  color: white;
}

.badge-warning {
  background-color: #ffc107;
  color: #212529;
}

/* Styles pour les modales SweetAlert2 */
.swal2-popup-custom {
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  background: #1e293b !important;
}

.swal2-title-custom {
  color: #f1f5f9 !important;
  font-size: 1.5em;
  font-weight: 700;
}

.swal2-content-custom {
  color: #cbd5e1 !important;
  font-size: 1em;
  line-height: 1.6;
}

/* Styles pour les formulaires dans les modales SweetAlert2 */
.swal2-popup input,
.swal2-popup select,
.swal2-popup textarea {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border: 0.5px solid #475569 !important;
}

.swal2-popup input:focus,
.swal2-popup select:focus,
.swal2-popup textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.swal2-popup label {
  color: #cbd5e1 !important;
}

.swal2-popup .form-control {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border: 0.5px solid #475569 !important;
}

.swal2-popup small {
  color: #94a3b8 !important;
}

.swal2-cancel {
  background-color: #6b7280 !important;
  border-color: #6b7280 !important;
  color: white !important;
}

.swal2-cancel:hover {
  background-color: #4b5563 !important;
  border-color: #4b5563 !important;
}

.swal2-confirm {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: white !important;
}

.swal2-confirm:hover {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

.swal2-archive {
  background-color: #f59e0b !important;
  border-color: #f59e0b !important;
  color: white !important;
}

.swal2-archive:hover {
  background-color: #d97706 !important;
  border-color: #d97706 !important;
}

.swal2-delete {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: white !important;
}

.swal2-delete:hover {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
}

/* ===== SUPPORT TASKS PAGE STYLES ===== */
/* Réduire l'espacement vertical des lignes du tableau des tâches uniquement */
#tasks-list .admin-table th,
#tasks-list .admin-table td {
  padding-top: 6px;
  padding-bottom: 6px;
}

#tasks-list .admin-table tr {
  height: auto;
}

#tasks-list .admin-table td > .btn {
  margin: 0;
}

/* ===== SUPPORT CALENDAR PAGE STYLES ===== */
.fc-event.ticket {
  background: #78350f !important;
  border-color: #f59e0b !important;
  color: #fcd34d !important;
}

.fc-event.meeting {
  background: #064e3b !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
}

.fc-event.milestone {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}

/* Assurer la lisibilité du texte dans tous les événements */
.fc-event {
  color: #f1f5f9 !important;
}

.fc-event .fc-event-main,
.fc-event .fc-event-time,
.fc-event .fc-event-title,
.fc-event .fc-event-main * {
  color: #f1f5f9 !important;
}

/* Styles pour les événements en vue dayGrid */
.fc .fc-daygrid-event .fc-event-main,
.fc .fc-daygrid-event .fc-event-time,
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-daygrid-event .fc-event-main *,
.fc .fc-daygrid-event .fc-event-main div,
.fc .fc-daygrid-event .fc-event-main span {
  color: #f1f5f9 !important;
}

/* Forcer la couleur du texte pour tous les éléments dans les événements */
.fc-event * {
  color: #f1f5f9 !important;
}

/* Styles spécifiques pour les événements avec couleurs personnalisées */
.fc-event[style*="background"] .fc-event-main,
.fc-event[style*="background"] .fc-event-main * {
  color: #f1f5f9 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Wrapper to control calendar height within the page (no vertical scroll) */
.calendar-wrapper {
  height: calc(100vh - 220px);
  min-height: 420px;
  overflow: hidden;
}

/* Supprimer la coupe forcée qui masquait les événements multi-jours */
.fc .fc-daygrid-day-events {
  max-height: none;
  overflow: visible;
}

.fc .fc-daygrid-more-link {
  display: inline-block;
}

/* Prevent body scroll inside calendar */
#calendar {
  height: 100%;
}

@media (max-height: 700px) {
  .calendar-wrapper {
    height: calc(100vh - 180px);
  }
}

/* Lisibilité en vue jour/heure: forcer la couleur du texte des évènements */
.fc .fc-timegrid-event .fc-event-main,
.fc .fc-timegrid-event .fc-event-time,
.fc .fc-timegrid-event .fc-event-title {
  color: #f1f5f9 !important;
}

.fc .fc-timegrid-event .fc-event-main * {
  color: #f1f5f9 !important;
}

.fc .fc-timegrid-event {
  opacity: 0.95;
}

/* Style pour le bouton de lien visio */
#evt-meeting-url-btn {
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

#evt-meeting-url-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== PROJECTS WIKI PAGE STYLES ===== */
.wiki-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}

.wiki-sidebar {
  border-left: 1px solid #3e3e42;
  padding-left: 12px;
  grid-column: 2;
  background: #252526;
  padding: 12px;
  border-radius: 4px;
}

.wiki-main {
  grid-column: 1;
}

.wiki-editor-toolbar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
  background: #2d2d30;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #3e3e42;
}

.wiki-editor-toolbar .btn.btn-sm {
  padding: 4px 8px;
  background: #3e3e42;
  border: 1px solid #464647;
  color: #cccccc;
  transition: all 0.2s ease;
}

.wiki-editor-toolbar .btn.btn-sm:hover {
  background: #505052;
  border-color: #5a5a5c;
}

/* Styles pour les boutons de formatage de style (comme Word en mode sombre) */
.wiki-editor-toolbar button[onclick*="execFormatBlock('h1')"],
.wiki-editor-toolbar button[onclick*="execFormatBlock('h1')"]:hover {
  background: #0078d4 !important;
  border-color: #005a9e !important;
  color: #ffffff !important;
  font-weight: 600;
}

.wiki-editor-toolbar button[onclick*="execFormatBlock('h2')"],
.wiki-editor-toolbar button[onclick*="execFormatBlock('h2')"]:hover {
  background: #106ebe !important;
  border-color: #0d5a9e !important;
  color: #ffffff !important;
  font-weight: 600;
}

.wiki-editor-toolbar button[onclick*="execFormatBlock('h3')"],
.wiki-editor-toolbar button[onclick*="execFormatBlock('h3')"]:hover {
  background: #1a86d9 !important;
  border-color: #1570c4 !important;
  color: #ffffff !important;
  font-weight: 600;
}

.wiki-editor-toolbar button[onclick*="execFormatBlock('p')"],
.wiki-editor-toolbar button[onclick*="execFormatBlock('p')"]:hover {
  background: #3e3e42 !important;
  border-color: #464647 !important;
  color: #cccccc !important;
}

.btn-group-compact {
  display: inline-flex;
  gap: 2px;
}

.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #3e3e42;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 0 4px rgba(0, 120, 212, 0.5);
}

.color-picker-btn {
  padding: 2px 6px;
  border: 1px solid #3e3e42;
  border-radius: 4px;
  background: #3e3e42;
  color: #cccccc;
  cursor: pointer;
  transition: background 0.2s ease;
}

.color-picker-btn:hover {
  background: #505052;
  border-color: #5a5a5c;
}

.wiki-editor {
  border: 1px solid #3e3e42;
  border-radius: 6px;
  padding: 12px;
  background: #ffffff;
  color: #000000;
  height: calc(100vh - 140px);
  overflow: auto;
  min-height: 400px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wiki-editor[contenteditable="true"]:focus {
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 2px #0078d4;
  border-color: #0078d4;
}

.wiki-page-title {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #3e3e42;
  border-radius: 6px;
  margin-bottom: 8px;
  background: #2d2d30;
  color: #cccccc;
}

.wiki-page-title:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.wiki-page-item {
  padding: 8px 6px;
  border-bottom: 1px solid #3e3e42;
  transition: background 0.2s ease;
}

.wiki-page-item:hover {
  background: #2a2d2e;
  border-radius: 4px;
}

.wiki-page-item a {
  text-decoration: none;
  color: #cccccc;
  display: block;
}

.wiki-page-item a:hover {
  color: #ffffff;
}

.wiki-page-item small {
  color: #858585;
}

/* Tables insérées dans le wiki */
.wiki-editor table.wiki-table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
}

.wiki-editor table.wiki-table th,
.wiki-editor table.wiki-table td {
  border: 1px solid #d1d1d1;
  padding: 8px;
}

.wiki-editor table.wiki-table thead th {
  background: #f3f3f3;
  font-weight: 600;
}

/* Styles pour les titres dans l'éditeur (comme Word) */
.wiki-editor h1 {
  color: #0078d4;
  font-size: 24px;
  font-weight: 600;
  margin: 16px 0 8px 0;
  line-height: 1.2;
}

.wiki-editor h2 {
  color: #106ebe;
  font-size: 20px;
  font-weight: 600;
  margin: 14px 0 6px 0;
  line-height: 1.3;
}

.wiki-editor h3 {
  color: #1a86d9;
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0 6px 0;
  line-height: 1.4;
}

.wiki-editor p {
  margin: 8px 0;
  line-height: 1.5;
}

/* Popover de redimensionnement d'image */
.img-resizer-popover {
  position: absolute;
  background: #1e293b;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
}

.img-resizer-popover input[type=range] {
  width: 160px;
}

.img-resizer-header {
  font-size: 12px;
  color: #444;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.img-resizer-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.wiki-toc {
  padding-left: 18px;
}

.wiki-toc li {
  margin: 4px 0;
}

/* ===== PROJECTS STRATEGIES PAGE STYLES ===== */
.form-section {
  margin-bottom: 2rem;
}

/* ===== PROJECTS BIA LIST PAGE STYLES ===== */
.status-planned {
  background: #334155;
  color: #cbd5e1;
}

.status-progress {
  background: #dbeafe;
  color: #1e40af;
}

/* ===== PROJECTS MVC LIST PAGE STYLES ===== */
.wide-scroll {
  overflow-x: auto;
  overflow-y: visible;
}

.wide-scroll table {
  min-width: 1200px;
}

/* ===== PROJECTS BIA SUB PAGES STYLES ===== */
.score-select {
  width: 100%;
  background: #0f172a;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 4px 8px;
}

.score-select option {
  background: #1e293b;
  color: #cbd5e1;
}

.score-1 {
  background: #064e3b;
  color: #d1fae5;
}

.score-2 {
  background: #365314;
  color: #fef9c3;
}

.score-3 {
  background: #78350f;
  color: #fed7aa;
}

.score-4 {
  background: #7f1d1d;
  color: #fecaca;
}

.score-5 {
  background: #991b1b;
  color: #fee2e2;
}

/* ===== PROJECTS BIA RETENTION PAGE STYLES ===== */
.gran-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.gran-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* ===== PROJECTS TESTS LIST PAGE STYLES ===== */
/* Compact table spacing for tests list */
.admin-table th,
.admin-table td {
  padding: 6px 10px;
  line-height: 1.2;
}

/* ===== PROJECTS TEST PHASE PREPARATION PAGE STYLES ===== */
.preview-block p {
  margin: 4px 0;
}

/* ===== PROJECTS VPAP APPS MAP PAGE STYLES ===== */
.map-container {
  width: 100%;
  height: 600px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #1e293b;
}

/* ===== PROJECTS VIEW PAGE STYLES ===== */
.stat-card-link {
  text-decoration: none;
}

/* ===== PRINT STYLES ===== */
@media print {
  .no-print {
    display: none !important;
  }
}

/* ===== PRI PROCEDURE VIEW PAGE STYLES ===== */
@media print {
  .admin-header .header-actions,
  .admin-header .btn {
    display: none !important;
  }
}

/* ===== PRI PROCEDURES PAGE STYLES ===== */
.rte {
  min-height: 200px;
}

/* ===== CONTENT HEADER STYLES ===== */
.content-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

/* ===== TASK FORM STYLES ===== */
.task-form {
  display: none;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.task-form-group {
  flex: 1 1 280px;
  min-width: 240px;
}

/* ===== WIKI HEADER ACTIONS STYLES ===== */
.wiki-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wiki-header-divider {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: #e5e7eb;
  margin: 0 6px;
}

/* ===== WIKI COLOR SWATCHES STYLES ===== */
.wiki-color-swatches {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: 6px;
}

/* ===== PROJECTS VIEW PAGE STYLES ===== */
.stat-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s ease;
}

.stat-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

.stat-card-link:hover .stat-icon {
  transform: scale(1.1);
}

.stat-card-link:hover .stat-content h3 {
  color: #3b82f6;
}

/* ===== PRINT STYLES (BIA, MVC, etc.) ===== */
@media print {
  .no-print {
    display: none !important;
  }
  
  .page {
    page-break-after: always;
  }
  
  html, body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .mat th, .mat td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  /* Avoid cutting tables across pages when possible */
  table, thead, tbody, tr, th, td {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  .mat, .apps {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  h3 {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }
  
  .table-group {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

.print-container {
  max-width: 980px;
  margin: 0 auto;
  background: #1e293b;
  padding: 20px;
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.print-title {
  font-size: 22px;
  font-weight: 700;
}

.print-section {
  margin: 18px 0;
}

.print-section h2 {
  font-size: 18px;
  margin: 0 0 8px 0;
  border-bottom: 1px solid #334155;
  padding-bottom: 4px;
}

.print-kv {
  display: grid;
  grid-template-columns: 220px 1fr;
  row-gap: 6px;
  column-gap: 10px;
}

.print-kv dt {
  color: #cbd5e1;
  font-weight: 600;
}

.print-kv dd {
  margin: 0;
}

.mat {
  border-collapse: collapse;
  width: 100%;
}

.mat th, .mat td {
  border: 1px solid #334155;
  padding: 6px;
  text-align: center;
}

/* ===== BIA PRINT SCORES ===== */
.score-1 {
  background: #064e3b !important;
  color: #d1fae5 !important;
}

.score-2 {
  background: #365314 !important;
  color: #fef9c3 !important;
}

.score-3 {
  background: #78350f !important;
  color: #fed7aa !important;
}

.score-4 {
  background: #7f1d1d !important;
  color: #fecaca !important;
}

.score-5 {
  background: #991b1b !important;
  color: #fee2e2 !important;
}

/* ===== BIA LIST STATUS STYLES ===== */
.status-done {
  background: #d1fae5;
  color: #065f46;
}

.status-validated {
  background: #bbf7d0;
  color: #166534;
}

.tag-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
}

.priority-badge {
  text-transform: uppercase;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

.priority-low {
  background: #e5e7eb;
  color: #cbd5e1;
}

.priority-medium {
  background: #fef3c7;
  color: #92400e;
}

.priority-high {
  background: #fee2e2;
  color: #991b1b;
}

.priority-critical {
  background: #fecaca;
  color: #7f1d1d;
}

/* ===== MVC LIST PAGE STYLES ===== */
.wide-scroll th, .wide-scroll td {
  white-space: nowrap;
}

.mvc-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.mvc-tab {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
}

.mvc-tab.active {
  border-bottom-color: #3b82f6;
  color: #3b82f6;
  font-weight: 500;
}

.mvc-tab-content {
  display: none;
}

.mvc-tab-content.active {
  display: block;
}

.status-draft {
  background: #334155;
  color: #cbd5e1;
}

.status-review {
  background: #fef3c7;
  color: #92400e;
}

.status-approved {
  background: #d1fae5;
  color: #065f46;
}

.tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted #666;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip:hover::before {
  content: '';
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top: none;
  border-bottom-color: #333;
  z-index: 9999;
}

/* ===== STRATEGIES FORM STYLES ===== */
.strategies-form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #1e293b;
  border-radius: 8px;
  border: 1px solid #334155;
}

.strategies-form-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #cbd5e1;
  font-size: 1.1rem;
  font-weight: 600;
}

.strategies-form-row {
  margin-bottom: 1rem;
}

.strategies-form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #cbd5e1;
}

.strategies-form-row input[type="text"],
.strategies-form-row input[type="number"],
.strategies-form-row input[type="date"],
.strategies-form-row input[type="datetime-local"],
.strategies-form-row select,
.strategies-form-row textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #475569;
  border-radius: 4px;
  font-size: 0.95rem;
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

/* Icône calendrier pour les champs de date dans strategies-form-row */
.strategies-form-row input[type="date"]::-webkit-calendar-picker-indicator,
.strategies-form-row input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.5);
  cursor: pointer;
  opacity: 0.9;
}

.strategies-form-row input[type="date"]::-webkit-calendar-picker-indicator:hover,
.strategies-form-row input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  filter: invert(1) brightness(2);
}

.strategies-form-row textarea {
  min-height: 80px;
  resize: vertical;
}

.strategies-form-row input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

.strategies-form-row.inline {
  display: flex;
  gap: 1rem;
}

.strategies-form-row.inline > div {
  flex: 1;
}

/* ===== PRI PROCEDURE VIEW PRINT STYLES ===== */
@media print {
  .admin-header .header-actions,
  .admin-header .btn {
    display: none !important;
  }
}

/* ===== PRI PROCEDURES RTE STYLES ===== */
.pri-rte {
  min-height: 200px;
}

/* ===== BIA RETENTION PAGE STYLES ===== */
.gran-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.gran-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.gran-group input[type="checkbox"] {
  margin: 0;
}

/* ===== VPAP APPS MAP PAGE STYLES ===== */
.map-container {
  background: #1e293b;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
  min-height: 600px;
}

.map-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

.map-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.legend-text {
  font-size: 14px;
  color: #cbd5e1;
}

#network-graph {
  width: 100%;
  height: 500px;
  border: 1px solid #334155;
  border-radius: 6px;
}

.map-node {
  cursor: pointer;
  stroke-width: 2px;
}

.map-node:hover {
  stroke-width: 3px;
}

.node-label {
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
  fill: #1f2937;
}

.node-subtitle {
  font-size: 10px;
  text-anchor: middle;
  pointer-events: none;
  fill: #6b7280;
}

.map-link {
  stroke: #94a3b8;
  stroke-opacity: 0.6;
  stroke-width: 2px;
}

.map-link:hover {
  stroke-opacity: 1;
  stroke-width: 3px;
}

.link-label {
  font-size: 10px;
  fill: #6b7280;
  text-anchor: middle;
  pointer-events: none;
}

.map-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
}

.map-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.map-stat-card {
  background: #f8fafc;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #334155;
}

.map-stat-title {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}

.map-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
}

/* ===== TESTS LIST PAGE STYLES ===== */
.test-table-container {
  margin-top: 8px;
}

.test-stat-badge {
  padding: 6px 8px;
}

/* ===== TEST PHASE PREPARATION PAGE STYLES ===== */
.preview-block p {
  margin: 4px 0;
}

.test-rte {
  min-height: 150px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #1e293b;
  resize: vertical;
  overflow: auto;
}

.test-rte:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.test-rte-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.test-rte-toolbar .btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

/* ===== BIA SUB DMIA/PDMA PAGE STYLES ===== */
/* Les styles score-1 à score-5 sont déjà définis plus haut */

/* ===== PRI PROCEDURE VIEW PRINT STYLES ===== */
@media print {
  .admin-container {
    padding: 0;
    margin: 0;
  }
  
  .panel {
    box-shadow: none;
    border: none;
  }
  
  .panel-body {
    padding: 0;
  }
  
  h1, h2 {
    page-break-after: avoid;
  }
}

/* ===== MVC PRINT PAGE STYLES ===== */
.mvc-print-defs {
  width: 100%;
  border-collapse: collapse;
}

.mvc-print-defs th, .mvc-print-defs td {
  border: 1px solid #334155;
  padding: 6px;
}

/* ===== VPAP PRINT PAGE STYLES ===== */
.vpap-print-kv {
  display: grid;
  grid-template-columns: 220px 1fr;
  column-gap: 10px;
  row-gap: 6px;
}

/* ===== BIA PRINT ADDITIONAL STYLES ===== */
.section {
  margin: 18px 0;
}

.section h2 {
  font-size: 18px;
  margin: 0 0 8px 0;
  border-bottom: 1px solid #334155;
  padding-bottom: 4px;
}

.kv {
  display: grid;
  grid-template-columns: 220px 1fr;
  row-gap: 6px;
  column-gap: 10px;
}

.kv dt {
  color: #cbd5e1;
  font-weight: 600;
}

.kv dd {
  margin: 0;
}

.apps {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.apps th, .apps td {
  border: 1px solid #334155;
  padding: 6px;
  vertical-align: top;
  word-wrap: break-word;
}

.comment {
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 10px;
  background: #fafafa;
}

.score-4 {
  background: #7f1d1d !important;
  color: #fecaca !important;
}

.score-select {
  width: 100%;
  background: #0f172a;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 4px 8px;
}

