/**
 * Suivi Réussite Commerciale - Cali&Co / Calisun
 * Charte graphique : #006EB9 (bleu), #FFBC00 (jaune/or)
 */

:root {
    --primary: #006EB9;
    --primary-dark: #005a9e;
    --accent: #FFBC00;
    --accent-dark: #e6a900;
    --text: #333;
    --text-muted: #666;
    --bg: #f5f7fa;
    --white: #fff;
    --border: #e0e4e8;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
}

.text-muted,
.muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    margin: 0;
}

.filtre-periode-card {
    background: var(--white);
    border-radius: 14px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,110,185,0.08);
    border: 1px solid rgba(0,110,185,0.12);
}

.filtre-periode {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filtre-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filtre-select-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.filtre-periode select {
    min-width: 140px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23006EB9' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filtre-periode select:hover {
    border-color: var(--primary);
}

.filtre-periode select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,110,185,0.15);
}

.filtre-periode select option {
    color: var(--text);
    background: var(--white);
}

.filtre-vue-annee {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.75rem 0 0.75rem 1.5rem;
    margin-left: 0.5rem;
    border-left: 2px solid var(--border);
}

.filtre-vue-annee input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.filtre-vue-annee:hover {
    color: var(--primary);
}

@media (max-width: 600px) {
    .filtre-periode {
        flex-direction: column;
        align-items: stretch;
    }
    .filtre-periode select {
        min-width: 100%;
    }
    .filtre-vue-annee {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        padding-top: 1rem;
        border-top: 2px solid var(--border);
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logos-table {
    margin: 0 auto 1rem;
    border-collapse: collapse;
}

.login-logos-table td {
    padding: 0 1rem;
    vertical-align: middle;
}

.login-logos-table .logo {
    max-height: 48px;
    max-width: 140px;
    display: block;
}

.login-header .logo {
    max-height: 60px;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0 0 0.25rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.forgot-password {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Layout principal */
.app-header {
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-header .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-header .brand img {
    height: 36px;
}

.app-header .brand h1 {
    font-size: 1.15rem;
    margin: 0;
    font-weight: 600;
}

.app-header .user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-header .header-extra-links {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-header .header-extra-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.95;
}

.app-header .header-extra-links a:hover {
    text-decoration: underline;
}

.app-header .header-agence-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-header .agence-selector {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.app-header .agence-selector option {
    color: var(--text);
}

.app-header .user-menu span {
    font-size: 0.9rem;
}

.app-header .btn-logout {
    color: var(--white);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    transition: background 0.2s;
}

.app-header .btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* Wrapper sticky : header + nav restent visibles en permanence lors du défilement */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Navigation — mobile first : burger par défaut ; barre horizontale à partir de 1101px */
.nav-primary {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.35rem 0.75rem 0.35rem 1rem;
}

.nav-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    color: var(--primary);
    -webkit-tap-highlight-color: transparent;
    z-index: 2;
}
.nav-burger:hover {
    background: rgba(var(--primary-rgb, 52, 152, 219), 0.08);
}
.nav-burger-lines {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
}
.nav-burger-lines span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-primary.nav-open .nav-burger-lines span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-primary.nav-open .nav-burger-lines span:nth-child(2) {
    opacity: 0;
}
.nav-primary.nav-open .nav-burger-lines span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-tabs {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    flex-basis: 100%;
    order: 3;
    padding: 0;
    margin: 0;
    overflow: visible;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    background: var(--white);
    border-bottom: none;
}

.nav-primary.nav-open .nav-tabs {
    display: flex;
}

.nav-tabs a {
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0;
    white-space: normal;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-tabs a:last-child {
    border-bottom: none;
}

.nav-tabs a:hover,
.nav-tabs a.active {
    color: var(--primary);
    border-bottom-color: var(--border);
    border-left-color: var(--primary);
    background: rgba(var(--primary-rgb, 52, 152, 219), 0.06);
}

@media (min-width: 1101px) {
    .nav-primary {
        display: block;
        padding: 0;
    }
    .nav-burger {
        display: none !important;
    }
    .nav-tabs {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        width: auto;
        flex-basis: auto;
        order: 0;
        padding: 0 1rem;
        box-shadow: none;
        gap: 0.2rem;
    }
    .nav-primary.nav-open .nav-tabs {
        display: flex !important;
    }
    .nav-tabs a {
        white-space: nowrap;
        padding: 0.55rem 0.85rem;
        margin-bottom: -1px;
        border-bottom: 3px solid transparent;
        border-left: none;
        background: transparent;
        font-size: 0.9rem;
    }
    .nav-tabs a:last-child {
        border-bottom: 3px solid transparent;
    }
    .nav-tabs a:hover,
    .nav-tabs a.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        border-left-color: transparent;
        background: transparent;
    }
}

/* Dropdown menus dans la nav */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    color: var(--text-muted);
    font-weight: 500;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(var(--primary-rgb, 52, 152, 219), 0.06);
}
.nav-caret {
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.nav-dropdown.open .nav-caret {
    transform: rotate(180deg);
}
.nav-dropdown-menu {
    display: none;
    flex-direction: column;
    background: var(--white);
}
.nav-dropdown.open .nav-dropdown-menu {
    display: flex;
}
.nav-dropdown-menu a {
    padding: 0.75rem 1.25rem 0.75rem 2.25rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s, background 0.2s;
}
.nav-dropdown-menu a:last-child {
    border-bottom: none;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb, 52, 152, 219), 0.04);
}

.nav-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    min-width: 16px;
    text-align: center;
    line-height: 1.3;
    margin-left: 0.35rem;
    vertical-align: middle;
}

@media (min-width: 1101px) {
    .nav-dropdown {
        position: relative;
        display: inline-flex;
    }
    .nav-dropdown-toggle {
        padding: 0.55rem 0.85rem;
        border-bottom: 3px solid transparent;
        border-left: none;
        background: transparent;
        width: auto;
        white-space: nowrap;
        font-size: 0.9rem;
    }
    .nav-dropdown-toggle:hover,
    .nav-dropdown-toggle.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        border-left-color: transparent;
        background: transparent;
    }
    .nav-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        z-index: 200;
        padding: 0.35rem 0;
    }
    .nav-dropdown-menu a {
        padding: 0.6rem 1rem;
        border-bottom: none;
        font-size: 0.88rem;
        white-space: nowrap;
    }
    .nav-dropdown-menu a:hover,
    .nav-dropdown-menu a.active {
        background: rgba(var(--primary-rgb, 52, 152, 219), 0.06);
    }
}

/* Contenu principal */
.main-content {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cartes */
.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.lien-membre {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.lien-membre:hover {
    text-decoration: underline;
}

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Formulaires */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,110,185,0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

/* Grille agences (admin) - 4 colonnes comme l'autre plateforme */
.agences-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.5rem 1.5rem;
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafbfc;
}

.agences-grid .agence-grid-item {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    margin: 0;
}

.agences-grid .agence-grid-item input[type="checkbox"] {
    width: auto !important;
    min-width: 1rem;
    margin: 0;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.agences-grid .agence-grid-item:hover {
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(0, 110, 185, 0.08);
}

@media (max-width: 768px) {
    .agences-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.05s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-accent {
    background: var(--accent);
    color: var(--text);
}

.btn-accent:hover {
    background: var(--accent-dark);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

/* Mobile : on garde l'esprit "compact" mais on assure une hitbox ≥40px
   pour respecter les guidelines tactiles (iOS HIG/Android Material). */
@media (max-width: 640px) {
    .btn-sm {
        min-height: 40px;
        padding: 0.5rem 0.85rem;
        font-size: 0.92rem;
    }
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #b02a37;
}

/* Alertes */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ffebee;
    color: var(--error);
}

.alert-success {
    background: #e8f5e9;
    color: var(--success);
}

/* Tableau */
.table-responsive {
    overflow-x: auto;
}

/* Mobile : pas de défilement horizontal sur les tableaux (sauf si déjà en mode cartes .table-mobile-cards) */
@media (max-width: 768px) {
    .table-responsive:not(.table-mobile-cards) {
        overflow-x: hidden !important;
        max-width: 100%;
    }
    .table-responsive:not(.table-mobile-cards) table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }
    .table-responsive:not(.table-mobile-cards) th,
    .table-responsive:not(.table-mobile-cards) td {
        word-break: break-word;
        overflow-wrap: anywhere;
        padding: 0.45rem 0.3rem;
        font-size: 0.8rem;
    }
    .table-responsive:not(.table-mobile-cards) th {
        font-size: 0.7rem;
        letter-spacing: 0;
    }
}

/* Tableaux dashboard : cartes uniquement sur petit écran (≥769px = tableau classique sur PC) */
@media (max-width: 768px) {
    .table-mobile-cards {
        overflow-x: visible;
    }
    .table-mobile-cards table {
        border-collapse: separate;
        border-spacing: 0;
    }
    .table-mobile-cards thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .table-mobile-cards tbody tr:not(.table-row-empty) {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--white);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }
    .table-mobile-cards tbody tr:not(.table-row-empty):hover td {
        background: transparent;
    }
    .table-mobile-cards tbody tr:not(.table-row-empty) td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.7rem 1rem;
        border-bottom: 1px solid var(--border);
        text-align: right;
        word-break: break-word;
    }
    .table-mobile-cards tbody tr:not(.table-row-empty) td:last-child {
        border-bottom: none;
    }
    .table-mobile-cards tbody tr:not(.table-row-empty) td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary);
        font-size: 0.8rem;
        text-align: left;
        flex: 0 0 42%;
        max-width: 42%;
        line-height: 1.35;
    }
    .table-mobile-cards tbody tr:not(.table-row-empty) td > * {
        flex: 1;
        min-width: 0;
        text-align: right;
    }
    .table-mobile-cards tbody tr.table-row-empty td {
        display: block;
        text-align: center;
        padding: 1.25rem 1rem;
        color: var(--text-muted);
        border-bottom: none;
    }
    .table-mobile-cards tbody tr.table-row-empty td::before {
        display: none;
    }

    /* Cellules d'actions (boutons Modifier/Suppr.) : on les sort du pattern
       "label gauche / valeur droite" pour qu'elles occupent toute la largeur
       de la card avec les boutons côte à côte, sans coupure de texte. */
    .table-mobile-cards tbody tr:not(.table-row-empty) td.actions-cell {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        align-items: stretch;
        padding: 0.75rem 1rem;
        background: var(--neutral-50, #f8fafc);
    }
    .table-mobile-cards tbody tr:not(.table-row-empty) td.actions-cell::before {
        display: none;
    }
    .table-mobile-cards tbody tr:not(.table-row-empty) td.actions-cell > .btn {
        flex: 1 1 0;
        min-width: 0;
        white-space: nowrap;
        text-align: center;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .table-mobile-cards .validation-input-heures {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Validations : une fiche à la fois sur mobile (la suivante apparaît après valider/refuser) */
    .validation-one-at-a-time.table-mobile-cards tbody tr:not(:first-child):not(.table-row-empty) {
        display: none !important;
    }

    /* Classement équipe : sur mobile, uniquement rang + nom (le reste reste sur desktop / au clic détail) */
    .table-classement-only tbody tr:not(.table-row-empty) td:nth-child(n + 3) {
        display: none !important;
    }
    .table-classement-only tbody tr:not(.table-row-empty) td:nth-child(2) {
        border-bottom: none;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg);
    font-weight: 600;
    color: var(--primary);
}

tr:hover td {
    background: rgba(0,110,185,0.03);
}

.clickable-row:hover td {
    background: rgba(0,110,185,0.06);
}

/* Stats / KPIs */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--primary);
}

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Grille de graphiques : une carte par ligne (mobile comme ordinateur) */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    min-width: 0;
}

.chart-card .chart-container {
    min-height: 260px;
}

.chart-doughnut {
    max-height: 320px;
}

/* Graphiques placeholder */
.chart-container {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 8px;
    margin: 1rem 0;
}

/* Objectifs commercial - affichage motivant */
.objectifs-commercial-card {
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, rgba(0,110,185,0.04) 0%, rgba(255,188,0,0.06) 100%);
}

/* Wizard objectifs RC */
.objectifs-wizard-cta {
    background: linear-gradient(135deg, rgba(0,110,185,0.08) 0%, rgba(0,110,185,0.04) 100%);
    border: 2px solid rgba(0,110,185,0.2);
}
.objectifs-wizard-cta-content h3 {
    margin: 0 0 0.35rem;
    color: var(--primary);
    font-size: 1.2rem;
}
.objectifs-wizard-cta-content p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.objectifs-wizard-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: rgba(0,110,185,0.08);
}
.objectif-wizard-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.objectif-wizard-fields .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}
.objectif-wizard-fields input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}
.objectif-wizard-fields input:focus {
    outline: none;
    border-color: var(--primary);
}
@media (max-width: 480px) {
    .objectif-wizard-fields {
        grid-template-columns: 1fr;
    }
}

/* Rapport RC */
.rapport-rc-card .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
}
.rapport-rc-desc {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.rapport-rc-status {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}
.rapport-rc-validated {
    color: var(--success);
    font-weight: 500;
}
.rapport-rc-arevoir {
    color: var(--warning);
}
.rapport-rc-table .rapport-mini {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.rapport-validations {
    margin-right: 0.5rem;
    font-size: 0.85rem;
}
.rapport-validations.rapport-refuse {
    color: var(--error);
}
.rapport-validations.rapport-pending {
    color: var(--warning);
}
.rapport-comment-input {
    width: 100%;
    max-width: 280px;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.objectifs-equipe-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: -0.5rem 0 1rem;
}
.objectifs-commercial-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.objectifs-mois {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
}

.objectifs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.objectif-item {
    background: var(--white);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.objectif-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.objectif-values {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.objectif-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.objectif-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.4s ease;
}

.objectif-pct {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.objectif-projection {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
    font-size: 0.78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.objectif-projection__icon {
    font-size: 0.9rem;
    line-height: 1;
}

.objectif-projection--ok {
    color: var(--success);
}

.objectif-projection--warn {
    color: #c0741a;
}

.objectifs-bravo, .objectifs-encouragement {
    margin: 1.25rem 0 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.objectifs-bravo {
    background: rgba(40,167,69,0.15);
    color: var(--success);
}

.objectifs-encouragement {
    background: rgba(255,188,0,0.2);
    color: var(--accent-dark);
}

/* Saisie hero + bouton CTA */
.saisie-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    color: var(--white);
    margin-bottom: 2rem;
}

.saisie-hero h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: var(--white);
}

.saisie-hero .text-muted {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}

.btn-saisie-cta {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: var(--accent);
    color: var(--text);
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-saisie-cta:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* Interface validation RC */
.validation-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 14px;
    color: var(--white);
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0,110,185,0.25);
}
.validation-hero-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.validation-hero-content h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--white);
}
.validation-hero-content p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.95;
    line-height: 1.4;
}
.validation-hero-badge {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.35rem 0.9rem;
    background: var(--accent);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
}

.validation-card {
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.validation-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.validation-card-header .validation-icon {
    font-size: 1.25rem;
    opacity: 0.9;
}
.validation-count {
    background: var(--primary);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    margin-left: auto;
}

.validation-empty {
    text-align: center;
    padding: 3rem 2rem;
}
.validation-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: var(--success);
    font-size: 2rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.validation-empty-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.35rem;
}
.validation-empty-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}
.validation-empty-sm {
    padding: 2rem;
}
.validation-empty-sm .validation-empty-desc {
    margin: 0;
}

.validation-table {
    font-size: 0.95rem;
}
.validation-table thead th {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.9rem 1rem;
}
.validation-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}
.validation-table tbody tr {
    transition: background 0.15s;
}
.validation-table tbody tr:hover {
    background: rgba(0,110,185,0.04);
}
.validation-date {
    font-weight: 500;
    color: var(--text);
}
.validation-ca {
    font-weight: 600;
    color: var(--primary);
}
.validation-input-heures {
    width: 4rem;
    padding: 0.5rem 0.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}
.validation-input-heures:focus {
    outline: none;
    border-color: var(--primary);
}

.validation-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.btn-valider {
    background: var(--success) !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 0.9rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-valider:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.35);
}
.btn-refuser {
    background: transparent !important;
    color: var(--text-muted) !important;
    border: 2px solid var(--border) !important;
    padding: 0.5rem 0.9rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-refuser:hover {
    border-color: var(--error) !important;
    color: var(--error) !important;
}

.validation-table-compact thead th,
.validation-table-compact tbody td {
    padding: 0.75rem 1rem;
}
.validation-heures {
    font-weight: 600;
    color: var(--primary);
}

@media (max-width: 768px) {
    .validation-hero {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    .validation-actions {
        flex-direction: column;
    }
    .validation-actions .btn {
        width: 100%;
    }
}

/* Modal wizard */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    z-index: 0;
}

.modal-overlay.open .modal-backdrop {
    pointer-events: auto;
}

.modal-saisie {
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.25);
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}
.modal-saisie.modal-wide {
    max-width: min(100vw - 2rem, 600px);
}

/* Étape lignes CA (modal élargi) : pas de zone scroll interne inutile */
.modal-saisie.modal-wide .modal-input {
    flex: 0 1 auto;
    max-height: none;
}

.modal-overlay.open .modal-saisie {
    pointer-events: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    z-index: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-saisie-content {
    padding: 2rem;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-progress {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-question {
    font-size: 1.25rem;
    margin: 0 0 1.5rem;
    color: var(--text);
}

.modal-input {
    margin-bottom: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    flex-shrink: 0;
}

.modal-buttons .btn {
    cursor: pointer;
    pointer-events: auto;
}

.wizard-oui-non {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    justify-content: center;
}

.btn-oui-non-simple {
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: #f0f4f8;
    color: var(--text);
    border-radius: 6px;
}

.btn-oui-non-simple:hover {
    background: #e0e8ef;
}

.btn-oui-non-simple:active {
    background: #d0d8e0;
}

.wizard-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
}

.wizard-checkbox-label input[type="checkbox"] {
    width: 1.4rem;
    height: 1.4rem;
    accent-color: var(--primary);
}

.wizard-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
}

.wizard-input:focus {
    outline: none;
    border-color: var(--primary);
}

.wizard-input.error {
    border-color: var(--error);
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.modal-btn-next {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    flex: 1;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.btn-prev {
    background: transparent;
    color: var(--text-muted);
}

.btn-prev:hover {
    background: var(--bg);
    color: var(--text);
}

/* Champs CA - ventes (évite la superposition date / montant / mode / Supprimer dans le modal) */
#ca-lignes-container {
    width: 100%;
}
.ca-ligne-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.ca-ligne-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}
.ca-input-date,
.ca-input-montant {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.ca-input-date {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}
.ca-input-montant {
    font-size: 1.1rem;
    padding: 0.9rem 1rem;
}
/* Boutons (pas de <select>) : sur iOS le menu natif se décale dans le modal */
.ca-mode-toggle {
    width: 100%;
    min-width: 0;
}
.ca-mode-buttons {
    display: flex;
    gap: 0.5rem;
}
.btn-ca-mode {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.65rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}
.btn-ca-mode.is-active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb, 52, 152, 219), 0.12);
    color: var(--primary);
    font-weight: 600;
}
.btn-ca-mode:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.ca-btn-remove {
    align-self: flex-end;
    flex-shrink: 0;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    white-space: nowrap;
}
.ca-btn-remove:hover {
    color: var(--danger, #c0392b);
}

/* Date + montant sur une ligne ; règlement pleine largeur en dessous */
@media (min-width: 600px) {
    .ca-ligne-fields {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
    }
    .ca-mode-toggle {
        grid-column: 1 / -1;
    }
}

.ca-add-vente {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    margin-top: 0.75rem;
    border: 2px dashed var(--border);
    background: var(--bg);
    color: var(--primary);
}
.ca-add-vente:hover {
    background: rgba(var(--primary-rgb, 52, 152, 219), 0.08);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-content {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/*
 * === Saisie wizard — Optimisations mobile (≤ 640px) ===
 * Objectifs : modale plein écran type « app native », boutons tactiles
 * confortables, split heures en cards verticales (lisible au pouce),
 * inputs anti-zoom iOS et bordure haute sur la barre de boutons pour
 * matérialiser le sticky-footer dès qu'on scrolle dans l'étape.
 */
@media (max-width: 640px) {
    /* Overlay edge-to-edge : on retire le padding et on laisse la
       modale prendre 100% (autrement les bandes blanches gâchent
       l'effet "app native" sur grands téléphones). */
    .modal-overlay {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }
    .modal-saisie,
    .modal-saisie.modal-wide {
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        height: 100dvh;
        width: 100%;
        border-radius: 0;
        margin: 0;
    }
    .modal-saisie-content {
        padding: 1.25rem 1rem;
        padding-top: max(1.25rem, calc(0.75rem + env(safe-area-inset-top)));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    .modal-close {
        top: max(0.5rem, env(safe-area-inset-top));
        right: 0.5rem;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.6rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    .modal-close:hover {
        background: var(--white);
    }
    .modal-question {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        padding-right: 2.5rem;
    }
    .modal-buttons {
        gap: 0.5rem;
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--border);
        background: var(--white);
    }
    .modal-btn-next {
        min-height: 52px;
        padding: 0.85rem 1rem;
        font-size: 1.05rem;
    }
    .btn-prev {
        min-height: 52px;
        padding: 0.85rem 0.75rem;
    }
    .wizard-input {
        font-size: 16px; /* anti-zoom iOS */
    }
    /* Split heures terrain/phoning/RDV : cards verticales 1 par ligne */
    .wizard-split-table {
        display: block;
        width: 100%;
    }
    .wizard-split-table thead { display: none; }
    .wizard-split-table tbody { display: block; width: 100%; }
    .wizard-split-table tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 0.5rem;
        row-gap: 0.4rem;
        align-items: end;
        background: var(--bg);
        padding: 0.85rem 0.9rem;
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 0.6rem;
    }
    .wizard-split-table .wizard-split-label {
        grid-column: 1 / -1;
        font-weight: 600;
        font-size: 0.95rem;
        padding: 0;
    }
    .wizard-split-table .wizard-split-cell {
        padding: 0;
        position: relative;
    }
    .wizard-split-table .wizard-split-cell::before {
        content: attr(data-mobile-label);
        display: block;
        font-size: 0.72rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.2rem;
    }
    .wizard-split-input {
        font-size: 16px !important;
        padding: 0.75rem 0.75rem !important;
        text-align: center;
    }
    /* Lignes RDV prospects : grille verticale (prénom puis nom) plus aérée */
    .rdv-prospect-row {
        gap: 0.6rem;
    }
    .rdv-prospect-field input.wizard-input {
        font-size: 16px;
        padding: 0.8rem 0.85rem;
    }
    /* Indicateur "Brouillon sauvegardé" plus discret */
    .wizard-saved-indicator {
        font-size: 0.7rem;
    }

    /* ---- Étape oui/non : centrage vertical + cibles tactiles confort ---- */
    /* :has() bien supporté Safari 15.4+/Chrome 105+/Firefox 121+ ; les
       navigateurs plus anciens conservent l'alignement par défaut, ce qui
       reste fonctionnel — juste un peu moins centré. */
    .modal-input:has(> .wizard-oui-non) {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .wizard-oui-non {
        gap: 0.75rem;
        width: 100%;
        justify-content: stretch;
    }
    .btn-oui-non-simple {
        flex: 1;
        min-height: 64px;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 14px;
        transition: transform 0.1s ease-out, background-color 0.15s;
    }
    .btn-oui-non-simple:active {
        transform: scale(0.97);
    }
    .btn-oui-non-simple[data-value="oui"] {
        background: #e8f5e9;
        color: #2e7d32;
    }
    .btn-oui-non-simple[data-value="oui"]:hover {
        background: #d6efd9;
    }
    .btn-oui-non-simple[data-value="non"] {
        background: #f4f6f8;
        color: #475569;
    }
    .btn-oui-non-simple[data-value="non"]:hover {
        background: #e6ebf0;
    }

    /* ---- Écran de succès en plein écran : actions empilées full-width ---- */
    .wizard-success-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
    }
    .wizard-success-actions .btn {
        width: 100%;
        min-height: 52px;
        font-size: 1.05rem;
    }
}

/* Étape CA ventes - mobile ergonomique */
@media (max-width: 480px) {
    /* IMPORTANT : on garde le plein écran défini ≤640px.
       Pas de marges latérales sinon on recasse le edge-to-edge. */
    .modal-saisie.modal-wide {
        max-width: 100%;
        margin: 0;
    }
    .modal-saisie-content {
        padding: 1.25rem;
    }
    .ca-ligne-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.25rem;
    }
    .ca-ligne-fields {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .ca-input-date,
    .ca-input-montant {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        font-size: 16px; /* évite le zoom iOS */
        padding: 1rem !important;
    }
    .btn-ca-mode {
        font-size: 16px;
        padding: 1rem 0.75rem;
    }
    .ca-btn-remove {
        align-self: flex-end;
        padding: 0.6rem 1rem;
    }
    .ca-add-vente {
        padding: 1.25rem;
        font-size: 1.05rem;
    }
}

/*
 * Densité bureau (en fin de fichier pour surcharger .main-content, .card, .btn, etc.)
 * Base 14px + marges resserrées = moins d’effet « zoom ».
 */
@media (min-width: 900px) {
    html {
        font-size: 14px;
    }
    .app-header {
        padding: 0.55rem 1.25rem;
    }
    .app-header .brand h1 {
        font-size: 1.05rem;
    }
    .main-content {
        padding: 1rem 1.25rem;
        max-width: 1280px;
    }
    .card {
        padding: 1rem 1.15rem;
        margin-bottom: 1rem;
    }
    .card-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    .card-header h2 {
        font-size: 1.1rem;
    }
    .btn {
        padding: 0.45rem 1rem;
        font-size: 0.95rem;
    }
    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
    .validation-hero {
        padding: 1rem 1.25rem;
        margin-bottom: 1.25rem;
        gap: 1rem;
    }
    .validation-hero-icon {
        width: 44px;
        height: 44px;
        font-size: 1.35rem;
        border-radius: 12px;
    }
    .validation-hero-content h2 {
        font-size: 1.1rem;
    }
    .validation-hero-content p {
        font-size: 0.9rem;
    }
    .saisie-hero {
        padding: 1.5rem 1.25rem;
        margin-bottom: 1.25rem;
    }
    .saisie-hero h2 {
        font-size: 1.25rem;
    }
    .btn-saisie-cta {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    .objectifs-commercial-card {
        margin-bottom: 1.25rem;
    }
    .objectifs-grid {
        gap: 0.9rem;
    }
    .objectif-item {
        padding: 0.75rem 1rem;
    }
    .objectif-values {
        font-size: 1rem;
    }
}

/* ── Mode consultation (lecture seule — RH) ────────────────────────── */
.consultation-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
    padding: 0.6rem 1.2rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid #ffc107;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.consultation-banner-icon {
    font-size: 1.1rem;
}

.mode-consultation form[method="POST"],
.mode-consultation form[method="post"],
.mode-consultation .btn-valider,
.mode-consultation .btn-refuser,
.mode-consultation .btn-soumettre-rapport-rc,
.mode-consultation .btn-soumettre-rapport-rp,
.mode-consultation .btn-saisie-cta,
.mode-consultation #btn-saisir-suivi,
.mode-consultation .form-delete-user,
.mode-consultation .btn-valider-prospecteur,
.mode-consultation .btn-refuser-prospecteur,
.mode-consultation .btn-valider-accompagnement,
.mode-consultation .btn-refuser-accompagnement,
.mode-consultation .btn-valider-commercial-dc,
.mode-consultation .btn-refuser-commercial-dc,
.mode-consultation .btn-valider-rapport-rc,
.mode-consultation .btn-revoir-rapport-rc,
.mode-consultation .rapport-comment-form,
.mode-consultation .form-toggle-user,
.mode-consultation [data-action="create"],
.mode-consultation [data-action="edit"],
.mode-consultation [data-action="delete"],
.mode-consultation [data-action="toggle"],
.mode-consultation .saisie-hero .btn,
.mode-consultation .btn-confirm-revoir,
.mode-consultation .btn-confirm-revoir-rp,
.mode-consultation .btn-valider-rapport-rp,
.mode-consultation .btn-revoir-rapport-rp {
    display: none !important;
}

.mode-consultation .validation-actions {
    display: none !important;
}

