/* ==========================================================================
   1. STYLES GÉNÉRAUX & ALIGNEMENT
   ========================================================================== */
body { 
    font-family: 'Segoe UI', sans-serif; 
    background: #f4f7f9; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    padding: 40px 20px; 
    box-sizing: border-box; 
    flex-direction: column; 
}

.logo-img { 
    max-width: 200px; 
    height: auto; 
    align-self: center; 
    margin-bottom: 20px; 
}

/* ==========================================================================
   2. CONTENEUR PRINCIPAL (CARD) & COMPORTEMENT DYNAMIQUE
   ========================================================================== */
.card { 
    background: white; 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
    width: 95%;           
    max-width: 1350px;    
    margin-bottom: 20px; 
    text-align: left; 
    box-sizing: border-box; 
}

/* Quand l'application CRM est active, la carte s'élargit sur presque toute la page */
.card.app-mode { 
    max-width: 1200px; 
    width: 95%;        
}

h2 { 
    color: #2c3e50; 
    text-align: center; 
    margin-top: 0; 
    font-size: 1.2rem; 
    font-weight: 500; 
}

/* ==========================================================================
   3. FORMULAIRES, INPUTS & SELECTS
   ========================================================================== */
.input-group { 
    margin-bottom: 15px; 
}

label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: 600; 
    color: #555; 
    font-size: 0.9em; 
}

input, select { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    box-sizing: border-box; 
    font-size: 15px; 
    background: white;
}

input:focus, select:focus { 
    border-color: #3498db; 
    outline: none; 
}

/* ==========================================================================
   4. BOUTONS GENERIQUES & LIGNE METIER
   ========================================================================== */
button { 
    color: white; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    padding: 12px; 
    font-weight: 600; 
    transition: 0.2s; 
    width: 100%; 
    font-size: 16px; 
}

.btn-main { 
    background: #3498db; 
    margin-top: 10px; 
}

.btn-main:hover { 
    background: #2980b9; 
}

.actions-secondary { 
    display: flex; 
    gap: 10px; 
    margin-top: 10px; 
}

.btn-copy { 
    background: #2ecc71; 
    flex: 2; 
}

.btn-copy:hover { 
    background: #27ae60; 
}

.btn-clear { 
    background: #e74c3c; 
    flex: 1; 
}

.btn-clear:hover { 
    background: #c0392b; 
}

/* ==========================================================================
   5. ÉCRANS D'AUTHENTIFICATION & NAVIGATION (CORRIGÉS ANTI-FLASH VISUEL)
   ========================================================================== */
/* Sécurité critique : masquer strictement tout au chargement de la page */
.screen { 
    display: none !important; 
}

.screen.active { 
    display: block !important; 
}

/* Sécurité critique : masquer toutes les sous-vues internes par défaut */
.crm-view {
    display: none !important;
}

.crm-view.active {
    display: block !important;
}

.auth-switch { 
    text-align: center; 
    margin-top: 15px; 
    font-size: 0.9em; 
    color: #7f8c8d; 
}

.auth-switch span { 
    color: #3498db; 
    cursor: pointer; 
    font-weight: bold; 
}

.auth-switch span:hover { 
    text-decoration: underline; 
}

.header-app { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 15px; 
    margin-bottom: 20px; 
}

@media (min-width: 400px) {
    .header-app { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; 
    }
}

.user-info { 
    font-size: 0.95em; 
    color: #2c3e50; 
}

.header-actions { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
}

.delete-zone {
    display: none; 
    background: #fdf2f2; 
    border: 1px solid #f8b4b4; 
    padding: 15px; 
    border-radius: 6px; 
    margin-bottom: 20px;
}

.delete-zone h3 {
    color: #c0392b; 
    margin-top: 0; 
    font-size: 1rem;
}

.delete-zone p {
    font-size: 0.85em; 
    color: #7f8c8d; 
    margin-bottom: 10px;
}

/* ==========================================================================
   6. ONGLETS DE NAVIGATION (ORDINATEUR VS MOBILE DÉROULANT)
   ========================================================================== */
.crm-tabs {
    margin-bottom: 25px;
    border-bottom: 2px solid #edf2f7; 
    padding-bottom: 10px;
    width: 100%;
}

/* Par défaut (PC) : On affiche les boutons et cache le menu mobile */
.tabs-desktop-only {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
}

.tabs-mobile-only {
    display: none !important; /* Caché sur ordinateur */
}

/* Style des boutons PC */
.crm-tabs .tab-btn {
    width: auto; 
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #4a5568;
    cursor: pointer;
    white-space: nowrap; 
    transition: all 0.2s ease;
}

.crm-tabs .tab-btn.active {
    background: #3498db; 
    color: white;
    border-color: #3498db;
    box-shadow: 0 4px 6px -1px rgba(52, 152, 219, 0.2);
}

/* bascule RESPONSIVE POUR MOBILE (< 767px) */
@media (max-width: 767px) {
    .tabs-desktop-only {
        display: none !important; /* On fait disparaître les boutons minuscules */
    }

    /* On affiche et stylise le menu déroulant mobile de façon très moderne */
    select.tabs-mobile-only {
        display: block !important;
        width: 100% !important;
        padding: 12px 15px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        border: 2px solid #3498db !important; /* Bordure distinctive couleur marque */
        border-radius: 8px !important;
        background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50' fill='%233498db'><polygon points='0,0 100,0 50,50'/></svg>") no-repeat calc(100% - 15px) center !important;
        background-size: 12px !important;
        appearance: none; /* Supprime la flèche native moche d'iOS/Android */
        -webkit-appearance: none;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .crm-tabs {
        border-bottom: none !important; /* Plus propre sur mobile */
        padding-bottom: 0 !important;
    }
}

/* ==========================================================================
   7. LOGIQUE MÉTIER / GÉNÉRATEUR D'EMAILS & CONFIGURATEUR FORMULAIRES
   ========================================================================== */
#results { 
    margin-top: 25px; 
    display: none; 
}

.instruction { 
    font-size: 0.85em; 
    color: #7f8c8d; 
    margin-bottom: 10px; 
    text-align: center; 
}

.list-container { 
    background: #fcfcfc; 
    border: 1px solid #eee; 
    border-radius: 6px; 
    padding: 5px; 
    margin-bottom: 10px; 
    max-height: 250px; 
    overflow-y: auto; 
}

.email-row { 
    font-family: 'Courier New', monospace; 
    padding: 10px; 
    border-radius: 4px; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: 0.2s; 
    margin: 2px 0; 
    user-select: none; 
    word-break: break-all; 
    color: #333; 
}

.email-row:hover { 
    background: #ecf0f1; 
}

.tips-box { 
    margin-top: 20px; 
    padding: 15px; 
    background: #fff9e6; 
    border-left: 4px solid #f1c40f; 
    border-radius: 4px; 
    font-size: 0.85em; 
    color: #7f6000; 
    line-height: 1.4; 
}

.tips-box strong { 
    color: #d4ac0d; 
}

.tips-box a { 
    color: #d35400; 
    font-weight: bold; 
    text-decoration: none; 
}

.tips-box a:hover { 
    text-decoration: underline; 
}

/* Style universel pour tous les formulaires compacts (Générateur, Connexion, Inscription) */
.generator-form-container {
    max-width: 420px;     
    margin: 0 auto;       
    padding: 10px 0 20px 0;
    width: 100%;
    box-sizing: border-box;
}

/* Centrage des titres pour les formulaires unifiés */
#view-login h2, 
#view-register-user h2,
#screen-login h2,
#screen-register h2,
#view-generator h2 {
    text-align: center;   
    margin-bottom: 25px;
    color: #2c3e50;
}

/* ==========================================================================
   8. BASE DE DONNÉES / TABLEAU CRM DES PROSPECTS
   ========================================================================== */
.table-container { 
    width: 100%; 
    overflow-x: auto; 
    margin-top: 15px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    background: white;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 1200px; 
    font-size: 13px; 
}

th, td { 
    padding: 12px 10px; 
    border-bottom: 1px solid #eee; 
    text-align: left; 
}

th { 
    background: #f8f9fa; 
    color: #2c3e50; 
    font-weight: 600; 
}

tr:hover { 
    background: #f9fbfd; 
}

.cell-fonction,
.comment-cell,
.cell-mail,
.cell-adresse,
.cell-opp-projet,
.cell-opp-client,
.cell-opp-commentaire { 
    cursor: pointer; 
    min-width: 250px; 
    max-width: 350px; 
    word-break: break-word; 
}

.comment-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px; 
}

.comment-date {
    font-size: 11px;
    color: #95a5a6;
    font-weight: 600;
}

.comment-text {
    font-size: 13px;
    color: #34495e;
    white-space: normal;
    word-break: break-word;
    font-style: italic;
}

.comment-cell:hover .comment-text { 
    text-decoration: underline; 
    color: #2980b9;
}

.badge {
    background: #e1f5fe;
    color: #0288d1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* ==========================================================================
   COULEURS DYNAMIQUES POUR LES BADGES DE STATUT CRM
   ========================================================================== */
/* Style générique (commun à tous les badges) */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

/* Prospect : Bleu */
.badge-prospect {
    background: #e1f5fe !important;
    color: #0288d1 !important;
    border: 1px solid #b3e5fc;
}

/* Client : Vert */
.badge-client {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #c8e6c9;
}

/* Pas intéressé : Rouge */
.badge-refus {
    background: #ffebee !important;
    color: #c62828 !important;
    border: 1px solid #ffcdd2;
}

.btn-edit, .btn-del, .btn-save { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto; 
    padding: 6px 10px; 
    font-size: 12px; 
    border-radius: 4px;
    margin: 2px;
    white-space: nowrap;
}

.btn-edit { 
    background: #f39c12; 
}
.btn-edit:hover { 
    background: #d35400; 
}

.btn-del { 
    background: #e74c3c; 
}
.btn-del:hover { 
    background: #c0392b; 
}

.btn-save { 
    background: #2ecc71; 
}
.btn-save:hover { 
    background: #27ae60; 
}

table td:last-child {
    white-space: nowrap; 
    text-align: center;  
}

.table-input { width: 100%; padding: 6px; font-size: 12px; border: 1px solid #3498db; border-radius: 4px; box-sizing: border-box; }
.table-select { width: 100%; padding: 6px; font-size: 12px; border: 1px solid #3498db; border-radius: 4px; background: white; }

.cell-entreprise,
.cell-opp-montant,
.cell-opp-date,
.cell-opp-pays,
.cell-opp-scenario,
.cell-opp-statut,
.cell-mobile,
.cell-telephone,
.cell-statut,
.cell-prenom,
.cell-nom,
.cell-action,
.cell-cp,
.cell-commune,
.cell-pays,
td[data-label="MàJ"] {
    min-width: 140px; 
    max-width: 180px; 
    word-break: break-word; 
}

/* ==========================================================================
   9. FENÊTRE MODALE POPUP (AJOUT PROSPECT & MAPPING CSV)
   ========================================================================== */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    overflow-y: auto; 
    padding: 20px 0; 
}

.modal-content { 
    background: white; 
    max-width: 600px; 
    margin: auto; 
    padding: 25px; 
    border-radius: 8px; 
    box-shadow: 0 4px 25px rgba(0,0,0,0.2); 
}

/* Style dédié aux lignes d'association de colonnes CSV */
.mapping-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf2f7;
}
.mapping-row label {
    margin: 0;
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
}
.mapping-row select {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.footer { 
    margin-top: 20px; 
    font-size: 0.8em; 
    color: #7f8c8d; 
    text-align: center; 
}

.footer a { 
    color: #3498db; 
    text-decoration: none; 
}

/* ==========================================================================
   11. SQUELETTE RESPONSIVE TABLEAU CRM
   ========================================================================== */
@media (max-width: 767px) {
    table thead {
        display: none; 
    }
    
    table, tfoot, tbody, tr, td {
        display: block;
        width: 100%;
    }
    
    .table-container {
        border: none;
        background: transparent;
        margin-top: 10px;
    }
    
    table {
        min-width: 100%;
    }
    
    table tbody tr {
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background: #fff;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
        box-sizing: border-box;
    }
    
    table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 5px;
        border-bottom: 1px solid #f5f5f5;
        font-size: 13px;
        box-sizing: border-box;
        flex-wrap: wrap; 
        gap: 10px;
    }
    
    table tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #7f8c8d;
        text-align: left;
        min-width: 100px; 
    }

    table tbody td.comment-cell .comment-wrapper {
        align-items: flex-end;
        text-align: right;
        flex: 1;
    }
    
    table tbody tr td:last-child {
        border-bottom: none;
        display: flex;
        flex-direction: column; 
        gap: 8px;               
        background: #fafafa;
        margin-top: 5px;
        padding: 12px 10px;
        border-radius: 0 0 6px 6px;
        box-sizing: border-box;
    }
    
    table tbody tr td:last-child button {
        width: 100%;
        margin: 0;
        padding: 10px;
        font-size: 13px;
    }
    
    .table-input, .table-select {
        max-width: 100%;
        flex: 1; 
    }
}

/* ==========================================================================
   12. ZONE DE RECHERCHE CRM & BOUTONS D'ACTIONS
   ========================================================================== */
.table-header-box {
    display: flex;
    flex-direction: column; 
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
}

.table-header-box h2 {
    margin: 0;
    text-align: left;
}

.header-crm-actions {
    display: flex;
    flex-direction: column; 
    gap: 12px;
    width: 100%;
}

.search-container {
    width: 100%;
    max-width: 100%; 
}

#crm-search-input {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ccd1d9;
    border-radius: 20px; 
    background: #fdfdfd;
    box-sizing: border-box; 
    transition: all 0.2s ease;
}

#crm-search-input:focus {
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.crm-buttons-group {
    display: flex;
    gap: 10px;
    justify-content: flex-start; 
    flex-wrap: wrap; 
}

.btn-add-contact {
    background: #2ecc71; 
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 20px; 
    width: auto; 
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(46, 204, 113, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-add-contact:hover {
    background: #27ae60;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
    transform: translateY(-1px);
}

.btn-export-excel {
    background: #3498db; 
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 20px;
    width: auto;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-export-excel:hover {
    background: #2980b9;
    box-shadow: 0 4px 8px rgba(41, 128, 185, 0.3);
    transform: translateY(-1px);
}

.btn-import-excel {
    background: #9b59b6; 
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 20px;
    width: auto;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(155, 89, 182, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-import-excel:hover {
    background: #8e44ad;
    box-shadow: 0 4px 8px rgba(142, 68, 173, 0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   13. COMPOSANTS ADDITIONNELS (MAIL COPY, MESSAGES TYPES CARDS)
   ========================================================================== */
.mail-copy-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.mail-copy-container a {
    word-break: break-all; 
}

.btn-inline-copy {
    background: none !important;
    border: none !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    width: auto !important;
    font-size: 13px !important;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-inline-copy:hover {
    opacity: 1;
    transform: scale(1.1);
    background: transparent !important;
    box-shadow: none !important;
}

.btn-inline-copy:active {
    transform: scale(0.9);
}

.messages-grid {
    display: block;
    column-count: 2; 
    column-gap: 20px;
    margin-top: 15px;
}

@media (max-width: 900px) {
    .messages-grid {
        column-count: 1; 
    }
}

.message-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    break-inside: avoid; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.message-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.message-card-header h3 {
    margin: 0;
    font-size: 14px;
    color: #2d3748;
    font-weight: bold;
}

.message-card-body textarea {
    width: 100%;
    height: 120px;
    border: 1px solid #ccd1d9 !important;
    background-color: #ffffff !important; 
    border-radius: 6px;
    padding: 10px;
    font-size: 13px;
    color: #4a5568;
    font-family: inherit;
    outline: none;
    box-sizing: border-box; 
    resize: vertical;       
    display: block;         
}

.message-card-body textarea:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
}

.btn-save-inline {
    background: #34495e;
    color: white;
    border: none;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-inline:hover {
    background: #2c3e50;
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* ==========================================================================
   14. SÉCURITÉ ET OPTIMISATION STRICTE MOBILE (< 767px)
   ========================================================================== */
@media (max-width: 767px) {
    body {
        padding: 10px 0 !important; 
        overflow-x: hidden; 
    }

    .logo-img { 
        max-width: 120px !important; 
        margin-bottom: 10px !important; 
    }

    /* Force la carte à épouser la largeur du smartphone sans déborder */
    .card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important; 
        padding: 15px 10px !important; 
        border-radius: 0 !important; 
        box-shadow: none !important;
        box-sizing: border-box !important;
    }

    .header-app {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        margin-bottom: 15px !important;
    }

    .header-actions {
        display: flex !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .header-actions button {
        flex: 1 !important; 
        padding: 8px 4px !important;
        font-size: 11px !important;
    }

    .crm-tabs {
        justify-content: space-between !important;
        gap: 4px !important;
        margin-bottom: 15px !important;
    }

    .crm-tabs .tab-btn, 
    .crm-tabs .btn-tab {
        flex: 1 !important;
        padding: 8px 2px !important; 
        font-size: 9.5px !important;  
        border-radius: 6px !important;
    }

    .table-header-box {
        align-items: stretch;
    }

    .header-crm-actions {
        max-width: 100%;
    }

    .crm-buttons-group {
        flex-direction: column; 
        gap: 8px;
    }
    
    .btn-add-contact,
    .btn-export-excel,
    .btn-import-excel {
        width: 100% !important; 
        justify-content: center;
        text-align: center;
    }

    table tbody td > * {
        max-width: 60% !important; 
        word-break: break-all !important;
    }

    /* Désactivation des tailles minimales bloquantes sur mobile */
    .cell-entreprise, .cell-statut, .cell-prenom, .cell-nom, .cell-action,
    .cell-cp, .cell-commune, .cell-pays, .cell-fonction, .comment-cell,
    .cell-mail, .cell-adresse,.cell-opp-montant, .cell-opp-date, .cell-opp-pays, .cell-opp-scenario, .cell-opp-statut, 
    td[data-label="MàJ"] {
        min-width: 0 !important;
        max-width: 100% !important;
        width: auto !important;
    }
}

/* ==========================================================================
   15. ONGLET MES TÂCHES / STRUCTURE PAR COLONNE
   ========================================================================== */
.tasks-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* Permet de scroller horizontalement sur PC/Tablette si besoin */
    padding-bottom: 15px;
    align-items: flex-start;
    width: 100%;
}

.task-column {
    flex: 1;
    min-width: 280px; /* Évite que les colonnes soient trop écrasées */
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
}

.task-column h3 {
    margin-top: 0;
    font-size: 14px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-count-badge {
    background: #3498db;
    color: white;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
}

.task-card {
    background: white;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.task-card:last-child {
    margin-bottom: 0;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.task-card-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 13px;
}

.task-card-company {
    font-size: 12px;
    color: #718096;
    margin-bottom: 8px;
}

.task-card-comment {
    font-size: 11px;
    color: #4a5568;
    background: #f7fafc;
    padding: 6px;
    border-radius: 4px;
    border-left: 2px solid #cbd5e0;
    font-style: italic;
    word-break: break-word;
}

/* Responsive mobile pour les tâches */
@media (max-width: 767px) {
    .tasks-grid {
        flex-direction: column; /* On empile les colonnes verticalement sur smartphone */
        overflow-x: hidden;
    }
    .task-column {
        width: 100%;
        min-width: 100%;
    }
}

/* ==========================================================================
   16. COULEURS SPECIFIQUES BADGES OPPORTUNITÉS
   ========================================================================== */
.badge-vigueur { background: #e8f5e9 !important; color: #2e7d32 !important; border: 1px solid #c8e6c9; }
.badge-soumise { background: #e1f5fe !important; color: #0288d1 !important; border: 1px solid #b3e5fc; }
.badge-construction { background: #fef9e7 !important; color: #b7950b !important; border: 1px solid #f9e79f; }
.badge-annule { background: #f2f3f4 !important; color: #7f8c8d !important; border: 1px solid #d5dbdb; }

/* Responsive Mobile pour la vue opportunités */
@media (max-width: 767px) {
    #opportunities-table, #opportunities-table tbody, #opportunities-table tr, #opportunities-table td {
        display: block;
        width: 100%;
    }
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}
.info-group label {
    font-weight: bold;
    color: #555;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}
.info-group p {
    font-size: 1.05rem;
    color: #111;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}