/* ====================================================================== */
/* == STYLESHEET PRINCIPAL HEBABO V2.1 - COMPLET == */
/* ====================================================================== */

/* 1. VARIABLES & RESET */
:root {
    --primary-color: #007bff;
    --primary-color-hover: #0056b3;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --border-radius: 8px;
    --transition-speed: 0.2s;
    /* ... autres variables ... */
    --agenda-color: #4682B4; /* Un bleu acier, différent du bleu standard */
    --agenda-color-hover: #4176A2;
}
html {
    scroll-behavior: smooth;
}
body.light-theme {
    --bg-color: #f4f7f9;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --header-bg: #ffffff;
    --header-text: #212529;
}

body.dark-theme {
    --bg-color: #121212;
    --bg-card: #1e1e1e;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --border-color: #495057;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --header-bg: #1e1e1e;
    --header-text: #e9ecef;
}

* { 
    box-sizing: border-box;
    margin: 0;
    padding: 0; 
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    /* --- NOUVEAUTÉS --- */
    min-height: 100vh; /* Prend au moins toute la hauteur de l'écran */
    display: flex;
    flex-direction: column;
}


body.popup-is-open {
    overflow: hidden;
}

/* 2. LAYOUT GÉNÉRAL */
.page-wrapper {
    /* On le centre horizontalement et on définit sa largeur maximale */
    max-width: 1600px; 
    margin: 0 auto;
    /* Crée la marge sur les côtés */
padding: 20px; /* Met 20px de marge PARTOUT (haut, bas, gauche, droite) */
}

#main-header-bar {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--header-bg);
    color: var(--header-text);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 5px var(--shadow-color);
    position: sticky; 
    top: 0; 
    z-index: 100;
    flex-shrink: 0; /* On s'assure que le header ne rétrécit jamais */
}

/* Style pour les domaines dans la popup */
#popupClientDetails ul {
    list-style: none; /* Supprime les puces */
    padding: 0; /* Supprime le padding par défaut */
    margin: 10px 0; /* Espace autour de la liste */
}

#popupClientDetails li {
    margin-bottom: 8px; /* Espace entre chaque domaine */
    padding: 8px 12px; /* Espace interne pour chaque élément */
    background-color: rgba(0, 123, 255, 0.1); /* Fond bleu clair */
    border-radius: 4px; /* Coins arrondis */
    transition: background-color 0.2s; /* Animation douce */
}

#popupClientDetails li:hover {
    background-color: rgba(0, 123, 255, 0.2); /* Fond légèrement plus foncé au survol */
}

#popupClientDetails a {
    color: var(--primary-color); /* Couleur du lien */
    text-decoration: none; /* Supprime le soulignement */
    font-weight: 500; /* Texte légèrement gras */
    display: flex; /* Permet d'aligner le texte et l'icône */
    align-items: center; /* Centre verticalement */
    justify-content: space-between; /* Espace entre le texte et le prix */
}

#popupClientDetails a:hover {
    text-decoration: underline; /* Soulignement au survol */
}

#popupClientDetails a::after {
    content: attr(data-prix); /* Affiche le prix comme contenu généré */
    color: var(--text-secondary); /* Couleur secondaire pour le prix */
    font-weight: normal; /* Texte normal pour le prix */
    margin-left: 10px; /* Espace entre le nom du domaine et le prix */
}


.header-logo { 
    height: 40px; 
    margin-right: 15px; 
}
#main-header-bar h1 { 
    font-size: 1.5rem; 
    margin-right: auto; 
}
.container { 
    max-width: 1600px; 
    margin: 20px auto; 
    padding: 0 20px; 
    /* --- NOUVEAUTÉS --- */
    flex-grow: 1; /* Permet à cette zone de grandir pour remplir l'espace vide */
    display: flex;
    align-items: center; /* Centre verticalement */
    justify-content: center; /* Centre horizontalement */
}
.content-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
}
.left-panel {
    display: flex;
    flex-wrap: wrap; /* Permet aux cartes de passer à la ligne */
    gap: 20px;
    flex-basis: 100%;
}
/* Les deux premières cartes (Client, Ajouter) se partagent la première ligne */
.left-panel .card:nth-child(1),
.left-panel .card:nth-child(2) {
    flex: 1; /* Elles se partagent l'espace disponible */
    min-width: 320px; /* Un minimum pour ne pas être trop écrasées */
}
/* La troisième carte (Résumé) prend toute la largeur, ce qui la force à passer en dessous */
.left-panel .card:nth-child(3) {
    flex-basis: 100%;
}
.left-panel .card {
    flex: 1;
    /* On enlève la marge du bas qui n'est plus nécessaire ici */
    margin-bottom: 0; 
}

/* Le panneau de droite (le viewer) prend aussi toute la largeur,
   ce qui le force à se placer sur la ligne en dessous. */
.right-panel {
    flex-basis: 100%;
}
.text-info-chrono p {
  display: block; 
	text-align : left;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 10px 0;
    opacity: 0.8;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}
.text-info-chrono i {
    margin-right: 5px;
}
/* 3. COMPOSANTS COMMUNS (CARD, BOUTONS, FORMULAIRES) */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px; 
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.card-header h2 { font-size: 1.2rem; }
.header-icons { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    font-size: 1.2rem; 
    color: var(--text-secondary); 
}
.header-icons i { 
    cursor: pointer; 
    transition: color var(--transition-speed), transform var(--transition-speed); 
}
.header-icons i:hover { 
    color: var(--primary-color); 
    transform: scale(1.1); 
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 10px;
}
button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}
button:hover { 
    transform: translateY(-1px); 
}
button:disabled { 
    cursor: not-allowed; 
    opacity: 0.7; 
}

/* 4. SECTIONS SPÉCIFIQUES À FACTURATION.PHP */
.details-table { width: 100%; border-collapse: collapse; }
.details-table td { padding: 8px 4px; border-top: 1px solid var(--border-color); }
.details-table tr:first-child td { border-top: none; }
.details-table td:first-child { width: 120px; color: var(--text-secondary); }

.add-item-section { margin-bottom: 15px; }
.add-item-section h4 { margin-bottom: 10px; }
.add-item-button { width: 100%; background-color: var(--primary-color); color: white; }
.add-item-button:hover { background-color: var(--primary-color-hover); }

.invoice-item {
    display: flex; align-items: center;
    padding: 10px 5px; border-bottom: 1px solid var(--border-color);
}
.invoice-item:last-child { border-bottom: none; }
.item-description { flex-grow: 1; }
.item-amount { font-weight: 600; margin: 0 15px; }
.delete-item-btn { color: var(--text-secondary); cursor: pointer; font-size: 1.1rem; }
.delete-item-btn:hover { color: var(--danger-color); }
.no-items-message { color: var(--text-secondary); text-align: center; padding: 20px; }

#generateInvoiceBtn {
    width: 100%; padding: 12px;
    background-color: var(--success-color); color: white;
    font-size: 1.1rem; border: none; margin-top: 10px;
}
#pdfViewerContainer {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    padding: 10px;
    width: 100%;
    aspect-ratio: 210 / 297;
    height: auto;

    display: flex;
    justify-content: center;
    align-items: center;
}
#postGenerationActions { text-align: center; margin-top: 15px; }
#postGenerationActions button { background-color: var(--primary-color); color: white; }

/* 5. POPUP */
.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s;
    z-index: 1000;
}
.popup-overlay.visible { display: flex; opacity: 1; visibility: visible; transition-delay: 0s; }
.popup-content {
    position: relative;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    background-color: var(--bg-card);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);

    /* --- AJOUTS POUR LE MOBILE --- */
    max-height: 85vh; /* Hauteur max = 85% de la hauteur de l'écran */
    overflow-y: auto;   /* Ajoute une barre de défilement si le contenu dépasse */
}
.popup-content::-webkit-scrollbar {
  width: 8px;
}
.popup-content::-webkit-scrollbar-track {
  background: transparent;
}
.popup-content::-webkit-scrollbar-thumb {
  background-color: var(--text-secondary);
  border-radius: 10px;
  border: 2px solid var(--bg-card);
}

.close-button {
    position: absolute; top: 10px; right: 20px;
    font-size: 2rem; font-weight: bold; color: var(--text-secondary);
    cursor: pointer; line-height: 1; z-index: 10;
}
.close-button:hover { color: var(--danger-color); }
.popup-actions { text-align: right; margin-top: 20px; }
.button-popup-delete { background-color: var(--danger-color); color: white; }
.button-popup-save { background-color: var(--success-color); color: white; }
.button-popup-warning {
    background-color: var(--warning-color);
    color: #212529;
}
.form-grid-popup {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* =================================================== */
/* 6. THÈME SWITCHER & ICÔNES */
/* =================================================== */

.theme-switcher button {
    background-color: var(--text-secondary);
    border-radius: 30px;
    width: 60px;
    height: 30px;
    padding: 3px;
    position: relative;
    border: none;
    cursor: pointer;
}

#theme-switch-handle {
    background-color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Cache l'icône qui n'est pas active */
}

.icon { 
    font-size: 16px; 
    user-select: none; 
    transition: opacity 0.3s ease-in-out;
}

.icon-moon { opacity: 0; }
.icon-sun { opacity: 1; }

/* La magie du slide : on déplace la poignée quand le mode sombre est actif */
body.dark-theme #theme-switch-handle {
    transform: translateX(30px);
}

/* On gère l'apparition/disparition des icônes lune/soleil */
body.dark-theme .icon-sun { opacity: 0; }
body.dark-theme .icon-moon { opacity: 1; }

/* Style pour l'icône d'alerte GLOBALE dans le header */
#global-overdue-alert {
    color: var(--warning-color);
    font-size: 1.4rem; 
    margin-left: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
#global-overdue-alert:hover { transform: scale(1.2); }

/* Style pour l'icône d'alerte SPÉCIFIQUE dans la carte client */
.overdue-alert-icon {
    color: var(--warning-color);
    font-size: 1.2rem; 
    cursor: pointer;
    transition: transform 0.2s ease;
}
.overdue-alert-icon:hover { transform: scale(1.1); }

/* ajout du 10 07 */
.icon-wrapper {
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    color: var(--text-secondary);
}

.icon-wrapper:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* 7. TABLES RESPONSIVES */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
}

.responsive-table caption {
    caption-side: top;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 15px;
    color: var(--danger-color);
}

.responsive-table th, 
.responsive-table td {
    padding: 10px;
    text-align: left;
}

.responsive-table th {
    background-color: var(--bg-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.responsive-table td {
    border-bottom: 1px solid var(--border-color);
}


/* 8. MEDIA QUERIES POUR LE RESPONSIVE */
@media (max-width: 1400px) {
    .content-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .responsive-table thead {
        display: none;
    }
    .responsive-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
    }
    .responsive-table td {
        display: block;
        text-align: right;
        border-bottom: 1px dotted var(--border-color);
    }
    .responsive-table td:last-child {
        border-bottom: none;
    }
    .responsive-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: var(--text-secondary);
    }
  .text-info-chrono {
    display: none; /* Masquer la div sur les petits écrans */
  }
}


#card-global-overdue-alert {
    color: var(--warning-color);
    font-size: 1.2rem;
    margin-right: 10px; /* Espace entre l'icône et le titre */
    cursor: pointer;
}

/* Styles pour les badges de statut */
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}
.status-badge.active { background-color: var(--success-color); }
.status-badge.overdue { background-color: var(--danger-color); }
.status-badge.inactive { background-color: var(--text-secondary); }

/* ============================================= */
/* Style pour l'icône d'alerte des factures      */
/* ============================================= */
.overdue-alert-icon {
    color: var(--warning-color); /* Une couleur orange/jaune bien visible */
    font-size: 1.1rem;         /* Une taille respectable */
    margin-right: 12px;       /* Un peu d'espace avec les autres icônes */
    cursor: pointer;         
    transition: transform 0.2s ease-in-out;
}

.overdue-alert-icon:hover {
    transform: scale(1.2); /* Un petit effet au survol pour le style */
}
/* =================================================== */
/* == STYLES POUR LES CARTES DU TABLEAU DE BORD     == */
/* =================================================== */

/* --- Style commun aux deux conteneurs de liste --- */
#task-list-container,
#event-list-container {
    width: 100%;
    margin-top: 15px;
    max-height: 350px;
    overflow-y: auto;
    padding: 5px 10px 5px 5px; /* Petit padding pour aérer */
	text-align: left;
}

/* --- Style commun aux deux listes <ul> --- */
.task-list,
.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- Style commun aux barres de défilement --- */
#task-list-container::-webkit-scrollbar,
#event-list-container::-webkit-scrollbar {
  width: 8px;
}
#task-list-container::-webkit-scrollbar-track,
#event-list-container::-webkit-scrollbar-track {
  background: transparent;
}
#task-list-container::-webkit-scrollbar-thumb,
#event-list-container::-webkit-scrollbar-thumb {
  background-color: var(--text-secondary);
  border-radius: 10px;
  border: 2px solid var(--bg-card);
}


/* --- Styles spécifiques à la Liste de Tâches --- */
/* Cache le bouton d'édition par défaut */
.edit-task-btn {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    margin-left: 10px; /* Espace avec le texte */
    color: var(--text-secondary);
    cursor: pointer;
}

/* Affiche les icônes d'édition et de suppression au survol */
.task-item:hover .edit-task-btn,
.task-item:hover .delete-task-btn {
    opacity: 0.7;
    visibility: visible;
}

.edit-task-btn:hover {
    color: var(--primary-color);
    opacity: 1;
}
/* --- Style pour les onglets Pro/Privé --- */
#task-type-selector {
    display: flex;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}
.task-type-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background-color: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 600;
}
.task-type-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.task-item {
    display: flex;
    align-items: center;
    padding: 10px 5px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}
.task-item:hover {
    background-color: rgba(128, 128, 128, 0.1);
}
.task-checkbox {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.2s;
    color: white;
}
.task-text {
    flex-grow: 1;
    font-size: 0.9rem;
}
.task-item.status-inprogress .task-checkbox {
    border-color: var(--warning-color);
    background-color: var(--warning-color);
}
.task-item.status-inprogress .task-checkbox::before {
    font-family: "Font Awesome 5 Free";
    content: '\f068'; /* fa-minus */
    font-weight: 900;
    font-size: 12px;
}
.task-item.status-done .task-text {
    text-decoration: line-through;
    opacity: 0.6;
}
.task-item.status-done .task-checkbox {
    background-color: var(--success-color);
    border-color: var(--success-color);
}
.task-item.status-done .task-checkbox::before {
    font-family: "Font Awesome 5 Free";
    content: '\f00c'; /* fa-check */
    font-weight: 900;
    font-size: 12px;
}
.delete-task-btn {
    margin-left: auto;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}
@media (hover: hover) {
    .task-item:hover .delete-task-btn {
        opacity: 0.7;
        visibility: visible;
    }
    .delete-task-btn:hover {
        color: var(--danger-color);
        opacity: 1;
    }
}
@media (hover: none), (max-width: 768px) {
    .task-item .delete-task-btn {
        opacity: 0.7;
        visibility: visible;
    }
}
.add-task-form {
    display: flex;
    width: 100%;
    margin-top: 15px;
    gap: 5px;
}
.add-task-form input {
    flex-grow: 1;
    padding: 8px;
    margin-bottom: 0;
}
.add-task-form button {
    padding: 8px 12px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
}
.add-task-form button:hover {
    background-color: var(--primary-color-hover);
}


/* --- Styles spécifiques à l'Agenda (Mise en page verticale) --- */

.event-list li {
    display: flex;
    flex-direction: column;   /* On empile les éléments verticalement */
    align-items: flex-start; /* On aligne tout à gauche */
    gap: 5px;                /* Espace entre la date et le résumé */
    padding: 12px 5px;
    border-bottom: 1px solid var(--border-color);
}

.event-list li:last-child {
    border-bottom: none;
}

a.event-date-link {
    text-decoration: none;
}

/* Le "bouton" de date devient un badge plus discret */
.event-date {
    display: inline-block; /* Pour qu'il s'adapte à son contenu */
    background-color: var(--agenda-color);
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

a.event-date-link:hover .event-date {
    background-color: var(--agenda-color-hover);
}

/* On remet le jour et la date sur une seule ligne à l'intérieur du badge */
.event-day-of-week,
.event-display-date {
    display: inline;
}

/* On ajoute un espace entre le jour et la date */
.event-day-of-week::after {
    content: " ";
}

.event-summary {
    font-size: 0.95rem;
    font-weight: 500;
}

/* --- Style pour le Zoom sur Image --- */
#invoice-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* S'assure que l'image est entièrement visible */
}


.img-zoom-container {
  position: relative;
}

.img-zoom-lens {
  position: absolute;
  border: 1px solid #d4d4d4;
  /* La taille de la loupe */
  width: 100px;
  height: 100px;
  background-color: rgba(255,255,255,0.3);
  cursor: crosshair;
}

.img-zoom-result {
  border: 1px solid var(--border-color);
  /* La taille de la vue zoomée */
  width: 500px;
  height: 500px;
  position: absolute;
  top: 0;
  left: 10%; /* Se place à droite de l'image */
  display: none; /* Cachée par défaut */
  box-shadow: 0 4px 12px var(--shadow-color);
  background-repeat: no-repeat;
  z-index: 100;
}
/* --- Style pour l'affichage du Chronomètre --- */
#timer-display {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(0, 123, 255, 0.1); /* Bleu très léger */
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-height: 60px; /* Pour éviter que la carte ne change de taille */
    display: none; /* Caché par défaut */
}
#timer-display.active {
    display: block; /* On l'affiche quand le chrono est actif */
}
#timer-display .timer-task {
    font-weight: bold;
    color: var(--text-primary);
}
#timer-display .timer-time {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 2px;
    display: block;
    margin: 5px 0;
}
#timer-display .stop-timer-btn {
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.task-client-selector {
    width: 100%;
    margin-bottom: 15px;
    text-align: left;
}
.task-client-selector select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
}
/* --- Style pour l'Horloge Live --- */
#timer-display {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    min-height: 50px; /* Pour que la carte ne change pas de taille */
    display: flex;
    justify-content: center;
    align-items: center;
}
.live-clock-time {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}
.live-clock-date {
    font-size: 0.9rem;
    display: block;
}

/* --- Style pour les contrôles du Chrono --- */
.timer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Espace entre les boutons */
    margin-top: 5px;
}

.timer-control-btn {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.timer-control-btn:hover {
    color: var(--primary-color);
}

.timer-control-btn.stop-btn:hover {
    color: var(--danger-color); /* Rouge pour le bouton stop */
}
/* --- Style pour l'infobulle du chrono --- */

/* On doit s'assurer que le conteneur est "positionné" pour que l'infobulle se place par rapport à lui */
#timer-display {
    position: relative;
    /* ... (tes autres styles pour le timer-display) ... */
}
/* Style pour la tâche sélectionnée (armée pour le chrono) */
.task-item.armed {
    background-color: rgba(0, 123, 255, 0.2);
}

/* Style pour le gros bouton "Lancer" */
#timer-display .start-timer-btn {
    width: 100%;
    height: 100%;
    padding: 10px;
    font-size: 1rem;
    font-weight: bold;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#timer-display .start-timer-btn .armed-task-text {
    font-size: 0.8em;
    opacity: 0.8;
}

/* --- Style pour les actions de brouillon --- */

#draft-actions-container {
    display: flex;       /* Aligne les boutons horizontalement */
    gap: 10px;           /* Espace entre les boutons */
    margin-top: 10px;
    align-items: center;
}

/* On cible tous les boutons dans ce conteneur pour les rendre plus petits */
#draft-actions-container button {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Le style pour le bouton rouge "Supprimer" */
.button-danger {
    background-color: var(--danger-color);
    color: white;

}
.button-danger:hover {
    background-color: #c82333; /* Un rouge un peu plus foncé au survol */
}
/* Rend le bouton de suppression de brouillon un peu plus petit */
#draft-actions-container .button-danger {
    padding: 2px 5px;
    font-size: 0.8rem;
}
/* Le style pour le bouton gris "Reprendre" */
.button-secondary {
    background-color: var(--text-secondary);
    color: white;
}
.button-secondary:hover {
    background-color: #5a6268;
}
.user-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px; /* On réduit un peu l'espace pour un bloc plus compact */
    padding: 8px 15px;         /* Espace à l'intérieur du bloc */
}
.user-actions .admin-link i {
    color:#4682b4;
    transition: transform 0.2s;
}
/* Le bouton login et logout */
.user-actions .admin-link:hover i {
    transform: scale(1.1); /* Petit effet de zoom au survol */
}

/* Style pour la liste des domaines */
.domaines-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.domaine-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.domaine-item:hover {
    background-color: rgba(0, 123, 255, 0.2);
}

.domaine-info {
    display: flex;
    align-items: center;
}

.domaine-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-right: 10px;
}

.domaine-prix {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Style pour le bouton on/off */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}
/* Style pour les domaines dans la popup */
#popupClientDetails ul {
    list-style: none; /* Supprime les puces */
    padding: 0; /* Supprime le padding par défaut */
    margin: 10px 0; /* Espace autour de la liste */
}

#popupClientDetails li {
    margin-bottom: 8px; /* Espace entre chaque domaine */
    padding: 8px 12px; /* Espace interne pour chaque élément */
    background-color: rgba(0, 123, 255, 0.1); /* Fond bleu clair */
    border-radius: 4px; /* Coins arrondis */
    transition: background-color 0.2s; /* Animation douce */
}

#popupClientDetails li:hover {
    background-color: rgba(0, 123, 255, 0.2); /* Fond légèrement plus foncé au survol */
}

#popupClientDetails a {
    color: var(--primary-color); /* Couleur du lien */
    text-decoration: none; /* Supprime le soulignement */
    font-weight: 500; /* Texte légèrement gras */
    display: flex; /* Permet d'aligner le texte et l'icône */
    align-items: center; /* Centre verticalement */
    justify-content: space-between; /* Espace entre le texte et le prix */
}

#popupClientDetails a:hover {
    text-decoration: underline; /* Soulignement au survol */
}

#popupClientDetails a::after {
    content: attr(data-prix); /* Affiche le prix comme contenu généré */
    color: var(--text-secondary); /* Couleur secondaire pour le prix */
    font-weight: normal; /* Texte normal pour le prix */
    margin-left: 10px; /* Espace entre le nom du domaine et le prix */
}
/* LE DASHBOARD */

/* Styles pour les filtres avancés */
.data-table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.data-table th {
    position: relative;
    padding: 12px 15px;
    vertical-align: middle;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    background-color: #e9ecef;
}

.data-table td {
    padding: 10px 15px;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.data-table tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
}

.pagination .page-link {
    padding: 0.5rem 0.75rem;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}

/* Filtres */
.table-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.search-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-filter .form-control,
.search-filter .form-select {
    min-width: 150px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Badges et statuts */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

/* Prévisualisation des logos */
.client-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.client-logo-large {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    margin-right: 1rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        justify-content: center;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
}
