/* ============================================================
   PLATEFORME — Extensions pour modules, auth, admin
   Compatible avec le thème OZAK (style.css)
   ============================================================ */

/* ============================================================
   PAGE AUTH (login/inscription)
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--c-bg);
}

.auth-pitch {
    background: var(--c-black);
    color: var(--c-white);
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-pitch::before {
    content: '';
    position: absolute;
    right: -150px; top: 20%;
    width: 500px; height: 500px;
    background: var(--c-red);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    z-index: 0;
}

.auth-pitch-content { position: relative; z-index: 1; }

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--c-white);
    letter-spacing: 2px;
}

.auth-brand-mark {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--c-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: var(--shadow-red);
}

.pitch-headline {
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.5px;
    margin: 80px 0 24px;
    color: var(--c-white);
}

.pitch-headline .accent { color: var(--c-red); }

.pitch-sub {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 460px;
    line-height: 1.55;
}

.pitch-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
    max-width: 580px;
    position: relative;
    z-index: 1;
}

.pitch-feature {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 18px;
    backdrop-filter: blur(10px);
}

.pitch-feature-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: var(--c-red-subtle);
    color: var(--c-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
}

.pitch-feature h4 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--c-white);
    letter-spacing: 0.3px;
}

.pitch-feature p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}

.auth-form-side {
    background: var(--c-white);
    padding: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card { width: 100%; max-width: 400px; }

.auth-section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--c-red);
    margin-bottom: 16px;
    font-weight: 700;
}

.auth-section-tag::before {
    content: '';
    width: 24px;
    height: 1.5px;
    background: var(--c-red);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.1;
    margin-bottom: 10px;
    color: var(--c-text-primary);
}

.auth-subtitle {
    color: var(--c-text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1.5px solid var(--c-border);
    margin-bottom: 28px;
}

.auth-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-muted);
    cursor: pointer;
    transition: var(--trans-fast);
    font-family: var(--font-body);
    margin-bottom: -1.5px;
}

.auth-tab.active {
    color: var(--c-red);
    border-bottom-color: var(--c-red);
    font-weight: 600;
}

.auth-tab:hover:not(.active) { color: var(--c-text-primary); }

.auth-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--c-border);
    font-size: 11px;
    color: var(--c-text-muted);
    text-align: center;
    letter-spacing: 0.3px;
}

/* ============================================================
   FORMULAIRES - extensions
   ============================================================ */
.form-label .required { color: var(--c-red); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-check {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; user-select: none;
    padding: 8px 0;
}
.form-check input { width: 16px; height: 16px; accent-color: var(--c-red); }

.password-input-wrapper { position: relative; }
.password-input-wrapper .form-control { padding-right: 80px; }

.password-action-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--c-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    transition: var(--trans-fast);
}

.password-action-btn:hover { color: var(--c-red); }
.password-action-btn.toggle { right: 8px; }
.password-action-btn.generate { right: 40px; }

.btn-block { width: 100%; }

/* ============================================================
   SIDEBAR — modules + admin
   ============================================================ */
.sidebar-logo-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--c-white);
    letter-spacing: 2px;
}

/* Items de navigation : gérer les longs textes proprement */
.sidebar .nav-item {
    /* On s'assure que l'item ne déborde pas */
    overflow: hidden;
}

.sidebar .nav-item .nav-icon {
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.sidebar .nav-item .nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13.5px;
    line-height: 1.3;
}

/* Tooltip natif via title= pour voir le nom complet au survol */
.sidebar .nav-item:hover .nav-label {
    /* Permet au texte de wrapper sur 2 lignes si vraiment long */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.sidebar-add-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    width: 22px; height: 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--trans-fast);
    margin-left: auto;
}
.sidebar-add-btn:hover {
    background: var(--c-red);
    border-color: var(--c-red);
    color: white;
}

.nav-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.empty-nav-note {
    padding: 10px 20px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.5;
}

.empty-nav-note a {
    color: var(--c-red-light);
    text-decoration: underline;
}

/* === Catégories dans la sidebar (module coffre) === */
.sidebar-categories { padding: 0 10px; }

.category-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 12px;
    margin: 1px 0;
    border-radius: var(--radius-sm);
    transition: var(--trans-fast);
    cursor: pointer;
}
.category-item:hover { background: rgba(255, 255, 255, 0.06); }

.category-item input[type="checkbox"] {
    width: 13px; height: 13px;
    accent-color: var(--c-red);
    cursor: pointer;
    flex-shrink: 0;
}

.category-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-item label {
    flex: 1; font-size: 13px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-item .delete-cat {
    opacity: 0;
    background: transparent; border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    transition: var(--trans-fast);
}
.category-item:hover .delete-cat { opacity: 0.7; }
.category-item .delete-cat:hover { opacity: 1; color: var(--c-red); }

.reset-filters {
    display: block;
    padding: 8px 12px;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}
.reset-filters:hover { color: var(--c-red); }

/* ============================================================
   CATALOGUE DES MODULES (module-card OZAK déjà défini)
   ============================================================ */
.module-card.installed {
    border-color: var(--c-success);
    background: rgba(0, 179, 126, 0.03);
}
.module-card.installed::before {
    content: '✓ Installé';
    position: absolute;
    top: 12px; right: 12px;
    background: var(--c-success);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    letter-spacing: 0.5px;
}

.module-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.module-status-toggle {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.module-status-label {
    font-size: 12px;
    color: var(--c-text-muted);
    font-weight: 500;
}

/* ============================================================
   ENTRÉES COFFRE — TABLEAU
   ============================================================ */

/* Badge catégorie (réutilisé dans le tableau) */
.entry-category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: var(--c-grey-100);
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    color: var(--c-text-secondary);
    white-space: nowrap;
}

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

/* En-tête : fond noir avec accent rouge en bas */
.table-coffre thead th {
    background: var(--c-black);
    color: var(--c-white);
    padding: 14px 16px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: left;
    border-bottom: 2px solid var(--c-red);
    white-space: nowrap;
    position: relative;
}

/* Petit chevron rouge à gauche du premier th */
.table-coffre thead th:first-child::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--c-red);
}

.table-coffre tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-border);
    font-size: 13.5px;
    vertical-align: middle;
}

/* Ligne d'accent rouge à gauche au hover */
.table-coffre tbody tr {
    transition: var(--trans-fast);
    position: relative;
    box-shadow: inset 3px 0 0 transparent;
}

.table-coffre tbody tr:hover {
    background: var(--c-red-subtle);
    box-shadow: inset 3px 0 0 var(--c-red);
}

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

/* Cellule "Service / URL" combinée */
.cell-service {
    min-width: 180px;
}
.cell-service .service-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--c-text-primary);
    letter-spacing: 0.2px;
    transition: var(--trans-fast);
}
.table-coffre tbody tr:hover .cell-service .service-name {
    color: var(--c-red);
}
.cell-service .service-url {
    font-size: 11.5px;
    color: var(--c-text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}
.cell-service .service-url a {
    color: var(--c-text-muted);
    text-decoration: none;
}
.cell-service .service-url a:hover {
    color: var(--c-red);
}

/* Cellule "Email" avec bouton copier inline */
.cell-email {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 12.5px;
    color: var(--c-text-secondary);
}
.cell-email .copyable {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--trans-fast);
}
.cell-email .copyable:hover {
    background: var(--c-white);
    color: var(--c-red);
    box-shadow: 0 0 0 1px var(--c-red);
}

/* Cellule "Mot de passe" — masqué par défaut */
.cell-password {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 13px;
}
.cell-password .pwd-value {
    color: var(--c-text-muted);
    letter-spacing: 2px;
}
.cell-password .pwd-value[data-revele="1"] {
    color: var(--c-red);
    font-weight: 600;
}
.cell-password .pwd-actions {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
}

/* Cellule "Catégorie" */
.cell-categorie .entry-category {
    margin: 0;
}

/* Cellule "Abonnement" */
.cell-abo {
    min-width: 130px;
}
.cell-abo .abo-info {
    font-size: 11.5px;
    color: var(--c-text-muted);
    margin-top: 4px;
    line-height: 1.4;
}
.cell-abo .abo-info strong {
    color: var(--c-red);
    font-weight: 700;
    font-family: var(--font-display);
}

/* Cellule actions */
.cell-actions {
    text-align: right;
    white-space: nowrap;
    min-width: 140px;
}
.cell-actions .btn-icon-small {
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-text-muted);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--trans-fast);
    margin-left: 2px;
}
.cell-actions .btn-icon-small:hover {
    border-color: var(--c-red);
    color: var(--c-red);
    background: var(--c-white);
    box-shadow: 0 2px 6px rgba(232, 0, 29, 0.15);
}
.cell-actions .btn-icon-small.danger:hover {
    background: var(--c-red);
    color: var(--c-white);
    border-color: var(--c-red);
}

/* Conteneur avec liseré rouge en haut */
.table-coffre-wrapper {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.table-coffre-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--c-red), var(--c-red) 80px, transparent 80px);
    z-index: 1;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

/* ============================================================
   FORMULAIRE HORIZONTAL (modale grande)
   ============================================================ */
.modal-xl {
    max-width: 860px;
}

/* Formulaire en grille horizontale */
.form-horizontal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
}

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

/* Champs qui prennent toute la largeur */
.form-horizontal .form-group.full-width {
    grid-column: 1 / -1;
}

/* Séparateur de section dans le formulaire */
.form-section-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--c-text-muted);
}

.form-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--c-border);
}

@media (max-width: 720px) {
    .form-horizontal {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    background: var(--c-bg-card);
    border: 2px dashed var(--c-border-dark);
    border-radius: var(--radius-lg);
    grid-column: 1 / -1;
}

.empty-state-icon {
    width: 60px; height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--c-red-subtle);
    color: var(--c-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--c-text-primary);
}
.empty-state p {
    color: var(--c-text-muted);
    margin-bottom: 24px;
    font-size: 14px;
}

/* ============================================================
   MODALE — extensions
   ============================================================ */
.modal-body { margin-bottom: 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--c-border);
    margin-top: 8px;
}
.modal-lg { max-width: 720px; }

/* ============================================================
   COMPTA — tableau opérations, factures
   ============================================================ */
.table-action-cell { text-align: right; white-space: nowrap; }
.table-action-cell .btn { margin-left: 4px; }

.amount-positive { color: var(--c-success); font-weight: 600; }
.amount-negative { color: var(--c-danger); font-weight: 600; }

.facture-lignes-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.facture-lignes-table th {
    padding: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--c-text-muted);
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}
.facture-lignes-table td {
    padding: 8px;
    border-bottom: 1px solid var(--c-border);
}
.facture-lignes-table td.action-col { width: 40px; text-align: center; }
.facture-lignes-table td.num-col { width: 100px; }
.facture-lignes-table td.qty-col { width: 80px; }
.facture-lignes-table input { width: 100%; }

.facture-totals {
    background: var(--c-grey-50);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 16px;
}
.facture-total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13.5px;
}
.facture-total-row.grand {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    border-top: 1px solid var(--c-border-dark);
    padding-top: 10px;
    margin-top: 8px;
    color: var(--c-red);
}

/* ============================================================
   ADMIN — vues spécifiques
   ============================================================ */
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.role-badge {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.role-badge.admin { background: var(--c-black); color: white; }
.role-badge.user  { background: var(--c-grey-100); color: var(--c-grey-700); }

/* ============================================================
   PRÉFÉRENCES — Choix sous forme de cartes
   ============================================================ */

.pref-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.pref-choice {
    cursor: pointer;
    display: block;
}

.pref-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pref-choice-card {
    padding: 20px 16px;
    background: var(--c-bg-card);
    border: 2px solid var(--c-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--trans-fast);
    height: 100%;
}

.pref-choice-card:hover {
    border-color: var(--c-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.pref-choice input[type="radio"]:checked + .pref-choice-card {
    border-color: var(--c-red);
    background: var(--c-red-subtle);
    box-shadow: 0 4px 12px rgba(232, 0, 29, 0.15);
}

.pref-choice input[type="radio"]:checked + .pref-choice-card .pref-choice-icon {
    transform: scale(1.1);
}

.pref-choice-icon {
    font-size: 32px;
    margin-bottom: 10px;
    transition: var(--trans-fast);
}

.pref-choice-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text-primary);
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.pref-choice input[type="radio"]:checked + .pref-choice-card .pref-choice-title {
    color: var(--c-red);
}

.pref-choice-desc {
    font-size: 12px;
    color: var(--c-text-muted);
    line-height: 1.4;
}

/* ============================================================
   MODALE FORMULAIRE HORIZONTAL — Design soigné
   Utilisé pour : tâches, contacts, mots de passe, etc.
   ============================================================ */

.modal-xxl {
    max-width: 1240px;
    width: 95vw;
}

.modal-xxl .modal-body {
    padding: 32px 36px;
}

/* Grille de colonnes (par défaut 3) */
.tache-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    position: relative;
}

/* Séparateurs verticaux entre les colonnes (sauf après la dernière) */
.tache-col + .tache-col {
    position: relative;
}
.tache-col + .tache-col::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--c-border) 12%,
        var(--c-border) 88%,
        transparent 100%);
}

.tache-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0; /* empêche les overflows en grid */
}

/* En-tête de colonne avec numéro */
.tache-col-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--c-text-primary);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--c-border);
    position: relative;
}

/* Petit chevron rouge à gauche du titre de colonne */
.tache-col-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--c-red);
    border-radius: 2px;
    flex-shrink: 0;
}

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

/* Labels avec bouton + intégré */
.tache-col .form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--c-text-secondary);
    margin-bottom: 6px;
}

/* Champs : un peu plus aérés dans la modale horizontale */
.modal-xxl .form-control {
    padding: 11px 14px;
    font-size: 14px;
}

.modal-xxl textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* Bouton + à côté des labels */
.inline-add-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--c-red);
    color: white;
    border: none;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--trans-fast);
    margin-left: auto;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(232, 0, 29, 0.25);
}
.inline-add-btn:hover {
    background: var(--c-black);
    transform: scale(1.12) rotate(90deg);
    box-shadow: 0 4px 10px rgba(10, 10, 12, 0.3);
}

/* Mini formulaire inline (cachés par défaut) */
.inline-form {
    display: none;
    padding: 14px;
    margin-top: 10px;
    background: var(--c-red-subtle);
    border: 1px dashed var(--c-red);
    border-radius: var(--radius);
    animation: slideDown 0.2s ease-out;
}
.inline-form.open {
    display: block;
}

.inline-form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.inline-form-row:last-of-type {
    margin-bottom: 10px;
}
.inline-form-row .form-control {
    flex: 1;
}

.inline-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Sélecteur participants en mode compact (dans la modale horizontale) */
.participants-selector.compact {
    min-height: 42px;
    padding: 10px;
    max-height: 180px;
    overflow-y: auto;
    gap: 6px;
}
.participants-selector.compact .participant-chip {
    padding: 5px 11px;
    font-size: 12.5px;
}
.participants-empty {
    color: var(--c-text-muted);
    font-size: 12px;
    margin: 0;
    width: 100%;
    text-align: center;
    padding: 6px;
    font-style: italic;
}

/* Footer modale plus aéré */
.modal-xxl .modal-footer {
    padding: 16px 36px 20px;
    background: var(--c-grey-50);
    border-top: 1px solid var(--c-border);
}

/* Header modale plus aéré */
.modal-xxl .modal-header {
    padding: 18px 36px;
}

.modal-xxl .modal-title {
    font-size: 22px;
    letter-spacing: 0.3px;
}

/* ============================================================
   RESPONSIVE — adaptation selon largeur d'écran
   ============================================================ */

/* Tablette : passe en 2 colonnes */
@media (max-width: 1100px) {
    .tache-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    .tache-col + .tache-col::before {
        left: -14px;
    }
    /* Sur 2 colonnes, la 3e prend toute la largeur */
    .tache-col:nth-child(3) {
        grid-column: 1 / -1;
        padding-top: 8px;
        border-top: 1px solid var(--c-border);
    }
    .tache-col:nth-child(3)::before {
        display: none;
    }
}

/* Mobile : 1 colonne */
@media (max-width: 720px) {
    .modal-xxl .modal-body { padding: 20px; }
    .modal-xxl .modal-header { padding: 14px 20px; }
    .modal-xxl .modal-footer { padding: 14px 20px; }
    .tache-cols {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .tache-col + .tache-col::before {
        display: none;
    }
    .tache-col:nth-child(n) {
        grid-column: auto;
        padding-top: 0;
        border-top: none;
    }
}

/* ============================================================
   SÉLECTEUR DE PARTICIPANTS (chips à cocher)
   ============================================================ */

.participants-counter {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--c-grey-100);
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    color: var(--c-text-secondary);
    letter-spacing: 0.5px;
}
.participants-counter.limit {
    background: var(--c-red);
    color: white;
}

.participants-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--c-grey-50);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    min-height: 50px;
    align-items: center;
}

.participant-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    cursor: pointer;
    transition: var(--trans-fast);
    font-size: 12.5px;
    user-select: none;
}
.participant-chip:hover {
    border-color: var(--c-red);
}
.participant-chip input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--c-red);
    margin: 0;
    cursor: pointer;
}
.participant-chip:has(input:checked) {
    background: var(--c-red-subtle);
    border-color: var(--c-red);
    color: var(--c-red);
    font-weight: 600;
}

/* ============================================================
   MODULE CARNET — Bascule personne/entreprise + téléphones
   ============================================================ */

/* Bascule type contact - plus design */
.contact-type-toggle {
    display: inline-flex;
    gap: 0;
    padding: 4px;
    background: var(--c-grey-100);
    border-radius: 99px;
    margin-bottom: 24px;
    width: fit-content;
    border: 1px solid var(--c-border);
}

.contact-type-btn {
    padding: 10px 22px;
    background: transparent;
    border: none;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-muted);
    cursor: pointer;
    transition: var(--trans-fast);
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.contact-type-btn:hover { color: var(--c-text-primary); }
.contact-type-btn.active {
    background: var(--c-black);
    color: var(--c-white);
    box-shadow: 0 2px 8px rgba(10, 10, 12, 0.2);
}

/* Liste des téléphones */
.telephones-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.telephone-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.telephone-row .tel-libelle {
    width: 110px;
    flex-shrink: 0;
}
.telephone-row .tel-numero {
    flex: 1;
    min-width: 0;
}
.telephone-row .btn-icon-small {
    flex-shrink: 0;
}

/* Liste téléphones vide */
.telephones-list:empty::before {
    content: 'Aucun numéro. Cliquez sur + pour en ajouter.';
    display: block;
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--c-text-muted);
    background: var(--c-grey-50);
    border: 1px dashed var(--c-border);
    border-radius: var(--radius);
    font-style: italic;
}

/* ============================================================
   CHIPS DU CARNET (module tâches lié)
   ============================================================ */
.participant-chip.from-carnet {
    background: rgba(147, 51, 234, 0.08);
    border-color: rgba(147, 51, 234, 0.3);
}
.participant-chip.from-carnet:hover {
    border-color: rgb(147, 51, 234);
}
.participant-chip.from-carnet:has(input:checked) {
    background: rgba(147, 51, 234, 0.15);
    border-color: rgb(147, 51, 234);
    color: rgb(126, 34, 206);
}

/* ============================================================
   CATALOGUE — Liste des liaisons inter-modules
   ============================================================ */
.liaisons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.liaison-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    transition: var(--trans-fast);
}
.liaison-card:hover {
    border-color: var(--c-red);
    box-shadow: var(--shadow-sm);
}

.liaison-module {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--c-text-primary);
}

.liaison-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.liaison-link {
    color: var(--c-red);
    font-size: 20px;
    font-weight: 700;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-pitch { padding: 40px; }
    .pitch-headline { font-size: 38px; margin: 60px 0 20px; }
    .auth-form-side { padding: 40px; }
}

@media (max-width: 768px) {
    /* Sur mobile : tout en une colonne (pitch puis formulaire empilés) */
    .auth-wrapper { grid-template-columns: 1fr; min-height: 100vh; }
    .auth-pitch { padding: 32px 24px; }
    .pitch-headline { font-size: 28px; margin: 40px 0 16px; }
    .pitch-features { grid-template-columns: 1fr; gap: 12px; }
    .auth-form-side { padding: 32px 24px; }
    .auth-title { font-size: 28px; }
    .form-row { grid-template-columns: 1fr; }
    .entries-grid { grid-template-columns: 1fr; }
    .modules-grid { grid-template-columns: 1fr; }
}
