:root {
    --negocial-red: #E30613;
    --dark-grey: #333333;
    --light-grey: #f4f4f4;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-grey);
    color: var(--dark-grey);
}

/* --- LOGIN PAGE --- */
.login-bg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('img/bg-login.jpg') center/cover;
}

.login-container {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo { width: 250px; margin-bottom: 20px; }
.logo-small { width: 150px; }

.input-group {
    margin-bottom: 20px;
    text-align: left;
}
.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

/* --- BUTTONS --- */
.btn-primary, .btn-secondary, .btn-outline {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
    display: inline-block;
}
.btn-primary { background-color: var(--negocial-red); color: var(--white); width: 100%; }
.btn-primary:hover { background-color: #c20510; }
.btn-secondary { background-color: var(--negocial-red); color: var(--white); }
.btn-outline { border: 1px solid var(--dark-grey); color: var(--dark-grey); background: transparent; }

/* --- DASHBOARD --- */
.navbar {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.nav-actions { display: flex; align-items: center; gap: 15px; }
.update-text { font-size: 0.9em; color: #666; }

.container { padding: 30px; max-width: 1400px; margin: auto; }

.commercial-section {
    background: var(--white);
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.commercial-title {
    color: var(--negocial-red);
    border-bottom: 2px solid var(--light-grey);
    padding-bottom: 10px;
    margin-top: 0;
}
.badge {
    background: var(--dark-grey);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7em;
    vertical-align: middle;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9em;
}
.data-table th { background-color: var(--light-grey); color: var(--dark-grey); }
.data-table td input[type="checkbox"] { transform: scale(1.2); cursor: pointer; accent-color: var(--negocial-red); }
/* --- NAVIGATION TABS --- */
.nav-links { display: flex; gap: 15px; margin-left: 30px; flex-grow: 1; }
.nav-links a { text-decoration: none; color: var(--dark-grey); font-weight: bold; padding: 8px 15px; border-radius: 4px; transition: background 0.3s; }
.nav-links a:hover { background: var(--light-grey); }
.nav-links a.active { background: var(--negocial-red); color: var(--white); }

/* --- DASHBOARD CARDS --- */
.summary-container { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
.summary-card { background: var(--white); padding: 25px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); width: 220px; text-align: center; border-top: 5px solid var(--negocial-red); }
.summary-title { font-size: 1.1em; color: var(--dark-grey); margin-bottom: 10px; font-weight: bold; }
.summary-number { font-size: 3em; font-weight: bold; color: var(--negocial-red); margin: 0; }
/* --- EN-TÊTE COMMERCIAL --- */
.commercial-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--light-grey);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.commercial-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--negocial-red);
}
.commercial-title {
    color: var(--negocial-red);
    margin: 0;
    border-bottom: none; /* Annule l'ancienne bordure */
    padding-bottom: 0;
}
/* --- DASHBOARD CARDS UPDATES --- */
.card-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid var(--negocial-red);
}
.stats-grid {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    border-bottom: 1px solid var(--light-grey);
    padding-bottom: 15px;
}
.stat-item { text-align: center; }
.stat-label { font-size: 0.8em; color: #666; text-transform: uppercase; }
.relances-info {
    margin-top: 15px;
    font-size: 0.9em;
    text-align: left;
    background: var(--light-grey);
    padding: 10px;
    border-radius: 6px;
}
.relances-info p { margin: 5px 0; color: var(--dark-grey); }

/* --- TABLE TICKS --- */
.tick-cell { text-align: center; font-size: 1.2em; color: #27ae60; font-weight: bold; }
/* --- ACCORDEONS ET GESTION DES MESSAGES --- */
.section-title {
    color: var(--dark-grey);
    border-bottom: 2px solid var(--negocial-red);
    padding-bottom: 5px;
    margin-top: 40px;
    margin-bottom: 20px;
}
details {
    background: var(--white);
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
summary {
    padding: 15px 20px;
    font-weight: bold;
    cursor: pointer;
    background: var(--light-grey);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary:after { content: "▼"; font-size: 0.8em; color: var(--negocial-red); }
details[open] summary:after { content: "▲"; }
details[open] summary { border-bottom: 1px solid var(--border-color); }
.details-content { padding: 20px; }
.help-text { font-size: 0.85em; color: #666; margin-top: 0; margin-bottom: 10px; font-style: italic; }

textarea.html-editor, textarea.sms-editor {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    resize: vertical;
}
textarea.html-editor { height: 200px; font-family: 'Courier New', Courier, monospace; background: #fafafa; }
textarea.sms-editor { height: 100px; font-family: inherit; }

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
    border: 1px solid #c3e6cb;
}
