﻿/* Thème "Grande distribution" pour Planning Entreprise */

/* Palette principale inspirée GMS (bleu enseigne + orange promo) */
:root {
    --app-primary: #004c97; /* bleu foncé type enseigne */
    --app-primary-dark: #003465;
    --app-primary-soft: #e1ecf7; /* bleu clair fond tableau */
    --app-accent: #ff7a00; /* orange promo */
    --app-danger: #e53935; /* rouge alerte */
    --app-success: #2e7d32; /* vert OK / validé */
    --app-bg: #f4f5f7; /* gris clair fond général */
}
   
html, body {
    height: 100%;
}

body {
    margin: 0;
    padding-top: 92px; /* hauteur navbar fixed-top */
    overflow-y: auto;
}
    body.bg-light {
        background-color: var(--app-bg) !important;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

/* NAVBAR PRINCIPALE – bandeau type enseigne */
.app-navbar {
    background: linear-gradient(90deg, var(--app-primary-dark), var(--app-primary));
}

.navbar-brand {
    letter-spacing: 0.03em;
    font-size: 1.1rem;
}

/* HERO – bandeau sous la navbar */
.app-hero {
    margin-top: 56px;
    background: linear-gradient(90deg, var(--app-primary), var(--app-primary-dark));
    color: #ffffff;
}

    .app-hero h1 {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    }

/* CONTENEUR PRINCIPAL */
.app-main {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

/* CARTE DE CONTENU – comme un “rayon” bien délimité */
.app-card {
    border-radius: 1rem !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* BOUTONS – style pro GMS */

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

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--app-primary-dark);
        border-color: var(--app-primary-dark);
    }

.btn-outline-secondary {
    border-radius: 999px;
}

/* Bouton accent (par ex. valider planning) */
.btn-accent {
    background-color: var(--app-accent);
    border-color: var(--app-accent);
    color: #fff;
}

    .btn-accent:hover,
    .btn-accent:focus {
        background-color: #e56a00;
        border-color: #e56a00;
        color: #fff;
    }

/* TABLEAUX – lisibilité type planning magasin */

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

    .table thead tr {
        background-color: var(--app-primary-soft);
    }

    .table thead th {
        border-bottom: 2px solid rgba(148, 163, 184, 0.7);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.04em;
    }

    .table tbody tr:hover {
        background-color: rgba(255, 244, 229, 0.5);
    }

/* Lignes “inactives” (ex : rayon inactif) */
tr.inactive-row {
    opacity: 0.65;
    background-color: #f3f4f6;
}

/* FOOTER */
.app-footer {
    background-color: #ffffff;
}

/* TITRES */
h1,
h2,
h3,
h4 {
    letter-spacing: 0.02em;
}

/* BADGES – style étiquettes rayon/promo */

.badge {
    border-radius: 999px;
}

.bg-primary-soft {
    background-color: var(--app-primary-soft);
    color: var(--app-primary-dark);
}

.badge-rayon {
    background-color: #fff7e6;
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-absence {
    background-color: #ffebee;
    color: #b71c1c;
    border: 1px solid rgba(244, 67, 54, 0.35);
}

.badge-presence {
    background-color: #e8f5e9;
    color: #1b5e20;
    border: 1px solid rgba(56, 142, 60, 0.4);
}

/* FORMULAIRES */

form .mb-3,
form .form-check {
    max-width: 480px;
}

.form-label {
    font-weight: 500;
}

.text-muted {
    color: #6b7280 !important;
}

/* PETITS DÉTAILS GÉNÉRAUX */

small,
.small {
    font-size: 0.82rem;
}

a {
    text-decoration-thickness: 0.08em;
}

/* Cartes sur la home (tableau de bord) */
.card {
    border-radius: 0.9rem;
}

/* =============================== */
/*         GRILLE PLANNING         */
/* =============================== */

/* Case de planning générique */
/* Cases génériques */
.planning-slot {
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 4px;
    min-height: 24px;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #ffffff;
    transition: background-color 0.08s ease, box-shadow 0.08s ease, border-color 0.08s ease;
}

    .planning-slot:hover {
        background-color: #fef3c7;
    }

/* Présence */
.planning-slot--presence {
    border-color: rgba(34, 197, 94, 0.9);
    color: #166534;
}

/* Début / milieu pour la continuité visuelle */
.planning-slot-start {
    border-radius: 999px 0 0 999px;
}

.planning-slot-middle {
    border-radius: 0;
    border-left-width: 0; /* fusion visuelle */
}

/* Sélection drag */
.planning-slot-selected {
    background-color: #fde68a !important;
    box-shadow: inset 0 0 0 2px #f59e0b;
}

/* Entêtes & cartes jour */
.planning-day-header-cell {
    background-color: var(--app-primary-soft);
    font-weight: 600;
    text-align: center;
}

.planning-employee-cell {
    background-color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
}

.planning-day-card {
    border-radius: 0.9rem;
}

.planning-day-card-header {
    background: linear-gradient(90deg, var(--app-primary-soft), #ffffff);
    border-bottom: 1px solid rgba(148, 163, 184, 0.5);
}
/* ===================================================== */
/*  Planning hebdo : colonnes qui s'adaptent à l'écran    */
/*  - --slot-w est calculé en JS (clamp 8px..28px)        */
/*  - --employee-col fixe la colonne "Salarié"            */
/* ===================================================== */

.planning-table {
    table-layout: fixed;
    width: 100%;
}

.planning-employee-col {
    width: var(--employee-col, 260px) !important;
    min-width: var(--employee-col, 260px) !important;
    max-width: var(--employee-col, 260px) !important;
}

/* Réduction / adaptation de largeur des cases du planning */
.planning-day-header-cell {
    padding: 2px 4px !important;
    min-width: var(--slot-w, 28px);
    width: var(--slot-w, 28px);
    font-size: 11px;
    white-space: nowrap;
}

/* Style minute : plus petit, couleur atténuée */
.minute-label {
    font-size: 9px;
    color: #666;
}

/* Heure principale : plus visible */
.hour-label {
    font-size: 12px;
    font-weight: 600;
}

/* Cases du planning */
.planning-slot {
    min-width: var(--slot-w, 28px) !important;
    width: var(--slot-w, 28px) !important;
    height: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.planning-tick-cell {
    width: var(--slot-w, 28px) !important;
    min-width: var(--slot-w, 28px) !important;
}

/* Par défaut, on évite de forcer une barre horizontale si ça tient */
.planning-table-wrap {
    overflow-x: hidden;
}

@media (max-width: 1200px) {
    /* Sur petits écrans, on réactive le scroll horizontal si nécessaire */
    .planning-table-wrap {
        overflow-x: auto;
    }
}
table.table-sm td, table.table-sm th {
    padding: 0 !important;
}
/* Style de la cellule employé (nom + rayon) */
.planning-employee-cell {
    font-size: 12px; /* plus petit */
    padding-left: 6px !important; /* espace avec la bordure */
    padding-right: 4px !important;
    line-height: 1.2;
    white-space: nowrap;
}

/* Le nom du salarié */
.employee-name {
    font-weight: 600;
    font-size: 12px;
}

/* Le rayon entre parenthèses */
.employee-rayon {
    font-size: 10px;
    color: #777;
}
.employee-name,
.employee-rayon {
    margin-right: 8px; /* espace clair entre le texte et la barre de shift */
    display: inline-block;
}
/* NAVBAR BLANCHE */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e5e5;
}

    /* Texte bleu dans la navbar */
    .navbar .nav-link,
    .navbar .navbar-brand {
        color: #0d47a1 !important; /* bleu foncé esthétique */
        font-weight: 600;
    }

        .navbar .nav-link:hover,
        .navbar .nav-link:focus {
            color: #1565c0 !important;
        }

    /* Icônes en bleu également */
    .navbar i {
        color: #0d47a1 !important;
    }

    /* Menu déroulant bleu foncé */
    .navbar .dropdown-menu {
        border: 1px solid #cbd5e1;
    }
/* ---- NAVBAR BLANCHE LIPEOS ---- */

.app-navbar {
    background-color: #ffffff !important;
}

    /* Liens du menu + marque */
    .app-navbar .navbar-brand,
    .app-navbar .nav-link,
    .app-navbar .dropdown-toggle {
        color: #004a99 !important; /* bleu profond */
        font-weight: 600;
    }

    /* Icônes */
    .app-navbar i {
        color: #004a99 !important;
    }

    /* Survol */
    .app-navbar .nav-link:hover,
    .app-navbar .dropdown-toggle:hover {
        color: #0074e8 !important; /* bleu un peu plus vif au survol */
    }
/* ---- NAVBAR BLANCHE LIPEOS (override complet) ---- */

.app-navbar {
    background: #ffffff !important; /* enlève le fond bleu */
    background-image: none !important; /* enlève un éventuel dégradé */
}

    /* Liens du menu + marque */
    .app-navbar .navbar-brand,
    .app-navbar .nav-link,
    .app-navbar .dropdown-toggle {
        color: #004a99 !important; /* bleu profond */
        font-weight: 600;
    }

    /* Icônes */
    .app-navbar i {
        color: #004a99 !important;
    }

    /* Survol des liens */
    .app-navbar .nav-link:hover,
    .app-navbar .dropdown-toggle:hover {
        color: #0074e8 !important; /* bleu un peu plus vif au survol */
    }
/* Quand le nombre d'heures hebdo dépasse le contrat */
.weekly-over-total {
    color: #c0392b; /* rouge foncé lisible */
    font-weight: 700; /* gras */
}
.weekly-over-total {
    color: #c0392b;
    font-weight: 700;
}
/* ----- Alignement des heures/minutes sur le trait gauche des cases ----- */

.planning-tick-cell {
    position: relative;
    padding-left: 0.25rem; /* léger décalage */
    padding-right: 0.25rem;
    text-align: left; /* texte aligné à gauche de la cellule */
}

    .planning-tick-cell .tick-label {
        display: block;
        font-size: 0.7rem;
        line-height: 1;
        margin-left: -4px; /* rapproche le chiffre du trait gauche de la case */
    }

    .planning-tick-cell .hour-label {
        font-weight: 600;
    }

    .planning-tick-cell .minute-label {
        font-weight: 400;
        opacity: 0.8;
    }
/* --- Arrondis sur les shifts --- */

/* Début de shift : arrondi à gauche */
.planning-slot-start {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

/* Fin de shift : arrondi à droite */
.planning-slot-end {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Milieu de shift : pas d’arrondi */
.planning-slot-middle {
    border-radius: 0 !important;
}
.absence-calendar-table th,
.absence-calendar-table td {
    white-space: nowrap;
}

.absence-day-cell {
    width: 26px;
    min-width: 26px;
    height: 28px;
}

.absence-block {
    display: block;
    width: 100%;
    height: 22px;
    border-radius: 4px;
    margin: 2px 1px;
    line-height: 22px;
}

.absence-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #000000;
}
/* --- Boutons de navigation principaux --- */

.app-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

.main-nav .nav-pill-link {
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(13, 110, 253, 0.15);
    background-color: #ffffff;
    color: #0d47a1;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

    .main-nav .nav-pill-link:hover,
    .main-nav .nav-pill-link:focus {
        background-color: #0d47a1;
        border-color: #0d47a1;
        color: #ffffff;
        box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.25);
        text-decoration: none;
    }

.main-nav .nav-pill-icon {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
}

.main-nav .nav-link.active {
    background-color: #0d47a1;
    border-color: #0d47a1;
    color: #ffffff;
}
/* Couleur orange personnalisée */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item.active {
    color: #f5a623 !important; /* orange logo */
    background-color: #f8f9fa !important; /* léger gris clair */
}

/* Pour le texte du bouton Paramètres lorsqu'il est ouvert */
.navbar .nav-link.dropdown-toggle.show {
    color: #f5a623 !important;
}
/* Survol du menu Paramètres */
.navbar .nav-item.dropdown:hover > .nav-link {
    color: #f5a623 !important;
}
/* Survol de TOUS les boutons du menu principal */
.navbar .main-nav .nav-link.nav-pill-link:hover,
.navbar .main-nav .nav-link.nav-pill-link:focus {
    color: #f5a623 !important; /* texte en orange */
}

/* L’icône dans le bouton devient orange aussi au survol */
.navbar .main-nav .nav-link.nav-pill-link:hover i,
.navbar .main-nav .nav-link.nav-pill-link:focus i {
    color: #f5a623 !important;
}
/* Petits boutons icône rond */
.icon-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Bouton discret "ghost" */
.ghost-btn {
    background: transparent !important;
    border: 1px solid #ddd;
    color: #333;
    font-weight: 500;
}

    .ghost-btn:hover {
        background: #f5f5f5 !important;
    }

/* Zone navigation semaine */
.week-nav {
    background: #f9f9f9;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}
/* Bandeau bleu */
.app-hero {
    /* tu gardes ton background existant */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Contenu du bandeau : centrage vertical */
.app-hero-inner {
    display: flex;
    align-items: center; /* centre verticalement */
    height: 40px; /* hauteur du bandeau */
}

    /* On neutralise les marges/line-height qui perturbent */
    .app-hero-inner h1,
    .app-hero-inner span {
        margin: 0;
        line-height: 1;
    }
/* Réduction globale des marges autour du contenu */
.app-main .container {
    padding-top: 10px;
    padding-bottom: 16px;
}

/* Réduction du padding interne du bloc principal du planning */
.weekly-wrapper {
    padding: 8px 15px !important;
}
/* SHIFT DE FIN : arrondi seulement à droite */
.planning-slot-end {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}
/* On neutralise tout arrondi global des slots */
.planning-slot {
    border-radius: 0 !important;
}
/* Début de shift : arrondi à gauche uniquement */
.planning-slot-start {
    border-top-left-radius: 16px !important;
    border-bottom-left-radius: 16px !important;
}

/* Milieu : aucun arrondi */
.planning-slot-middle {
    border-radius: 0 !important;
}

/* Fin de shift : arrondi uniquement à droite */
.planning-slot-end {
    border-top-right-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
}
/* Boutons de réorganisation des salariés : très discrets */
.order-btn {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.8rem; /* plus petit */
    color: #9aa0a6; /* gris discret */
    cursor: pointer;
}

    .order-btn:hover {
        color: #555; /* un peu plus foncé au survol */
    }

    .order-btn:focus {
        outline: none;
        box-shadow: none;
    }
/* ================================
   MODE IMPRESSION
   ================================ */
@media print {

    /* Cache tout ce qui est marqué no-print */
    .no-print {
        display: none !important;
        visibility: hidden !important;
    }

    /* Masquer chrome de l'appli (menus, header, footer…) */
    header,
    footer,
    .app-hero,
    .app-navbar,
    .navbar,
    .nav,
    .btn.no-print,
    .icon-btn,
    .ghost-btn {
        display: none !important;
    }

    body {
        margin: 0;
        padding: 0;
        background: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Les containers doivent prendre toute la largeur en mode impression */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .app-main,
    .app-card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* ======= Planning hebdomadaire ======= */
    .planning-print-root {
        transform: scale(0.9);
        transform-origin: top left;
        width: 111%;
    }

    .planning-day-card,
    .row.g-3 > .col-12 {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* ======= Planning congés (multi-mois) ======= */

    /* Pas de réduction : on laisse le bloc prendre toute la largeur */
    .absence-print-root {
        transform: none !important;
        width: 100% !important;
    }

    /* Un mois complet ne doit pas être coupé */
    .absence-month-card {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* ======= Reporting mensuel salarié ======= */
    .reporting-print-root {
        transform: none !important;
        width: 100% !important;
    }

    /* Évite de couper le tableau et la zone signature */
    .reporting-print-root table,
    .reporting-print-root .table-responsive,
    .reporting-print-root .border.rounded {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Tables communes */
    .table-responsive {
        overflow: visible !important;
    }

    table {
        font-size: 9pt !important;
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }

    th, td {
        border: 1px solid #888 !important;
        padding: 2px 4px !important;
    }

    .planning-day-card,
    .card,
    .card-header,
    .card-body {
        box-shadow: none !important;
        border: none !important;
        background: white !important;
    }

    @page {
        size: A4 landscape;
        margin: 8mm;
    }
}
@media print {

    /* Impression en une page si possible */
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    /* Éviter les sauts de page internes */
    .reporting-print-root,
    .reporting-print-root .table-responsive,
    .reporting-print-root table,
    .reporting-print-root thead,
    .reporting-print-root tbody,
    .reporting-print-root tfoot {
        page-break-inside: avoid;
        break-inside: avoid;
    }

        /* Ne jamais couper une ligne */
        .reporting-print-root tr {
            page-break-inside: avoid;
            break-inside: avoid;
        }

        /* Compacter un peu pour gagner de la place */
        .reporting-print-root h2 {
            margin-bottom: 4px;
        }

        .reporting-print-root .table td,
        .reporting-print-root .table th {
            padding: 4px 6px;
            font-size: 11px;
        }

        .reporting-print-root p {
            margin-bottom: 4px;
        }
}
@media print {

    /* Cache ce qui ne doit pas sortir sur papier */
    .no-print {
        display: none !important;
    }

    /* Chaque salarié commence sur une nouvelle page */
    .employee-print-block {
        break-before: page;
        page-break-before: always;
    }

        /* Sauf le premier salarié */
        .employee-print-block:first-of-type {
            break-before: auto;
            page-break-before: auto;
        }

        /* Empêche de couper un tableau au milieu d’une ligne */
        .employee-print-block table,
        .employee-print-block tbody,
        .employee-print-block tr {
            break-inside: avoid;
            page-break-inside: avoid;
        }

    /* Bonus : éviter que .table-responsive gêne en print */
    .table-responsive {
        overflow: visible !important;
    }

    @page {
        margin: 12mm;
    }
}
@media print {
    .no-print {
        display: none !important;
    }

    .employee-print-block {
        break-before: page;
        page-break-before: always;
    }

        .employee-print-block:first-of-type {
            break-before: auto;
            page-break-before: auto;
        }

    .table-responsive {
        overflow: visible !important;
    }

    @page {
        margin: 12mm;
    }
}
@media print {

    /* Forcer le format paysage */
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    /* Éviter toute contrainte de largeur écran */
    body {
        width: 100%;
    }

    /* Le planning doit prendre toute la largeur */
    .planning-print-root {
        width: 100% !important;
        max-width: none !important;
    }

    /* Supprimer tout scroll en impression */
    .planning-scroll,
    .table-responsive {
        overflow: visible !important;
    }

    /* Amélioration lisibilité */
    table {
        font-size: 11px;
    }

    th, td {
        padding: 3px 4px;
        white-space: nowrap;
    }
}

/* ============================= */
/* TRAIT HEURE PLEINE – HAUTEUR CASE EXACTE */
/* ============================= */

/* Jamais de trait dans l'entête */
.planning-table thead .hour-boundary::before {
    content: none !important;
}

/* Base : nécessaire pour le layout des cases */
.planning-slot {
    position: relative;
}

    /* Trait heure pleine : 1 seul trait net, sans doublon (dans la case) */
    .planning-slot.hour-boundary {
        box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.22);
    }
/* ===== PLANNING CONGÉS – GRILLE MENSUELLE ===== */

.planning-month-table {
    table-layout: fixed; /* 🔴 OBLIGATOIRE */
    width: 100%;
    border-collapse: collapse;
}

    /* Colonne salarié */
    .planning-month-table .employee-col {
        width: 260px; /* ajuste si besoin */
        min-width: 260px;
        max-width: 260px;
    }

    /* Toutes les cellules jour = même largeur */
    .planning-month-table th.day-col,
    .planning-month-table td.day-col {
        width: 32px; /* ⬅️ LA VALEUR CLÉ */
        min-width: 32px;
        max-width: 32px;
        text-align: center;
        vertical-align: middle;
        padding: 2px;
        white-space: nowrap;
    }

    /* Bordures nettes */
    .planning-month-table th,
    .planning-month-table td {
        border: 1px solid #d0d7e2;
    }

    /* Contenu CP / congé centré */
    .planning-month-table .absence-cell {
        font-size: 0.75rem;
        font-weight: 600;
        background-color: #fff3cd;
    }
/* ===== PLANNING CONGÉS – GRILLE CSS GRID (cellules identiques) ===== */

.absence-grid-wrap {
    overflow-x: auto;
}

/* 1 colonne salarié + N jours */
.absence-grid-header,
.absence-grid-row {
    display: grid;
    grid-template-columns: 240px repeat(var(--days-in-month), 32px);
}

/* En-tête */
.absence-grid-header {
    background: #f8f9fa;
    border-bottom: 1px solid #cfd6e0;
}

.absence-header-cell {
    font-weight: 600;
    font-size: 0.75rem;
    text-align: center;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #d0d7e2;
}

/* Colonne salarié */
.absence-employee-cell {
    padding: 4px 6px;
    border-right: 1px solid #d0d7e2;
    white-space: nowrap;
}

/* Cellules jours : toutes identiques */
.absence-day-cell {
    width: 28px;
    height: 26px;
    border-right: 1px solid #d0d7e2;
    border-bottom: 1px solid #d0d7e2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.70rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Absence (CP, etc.) */
.absence-cell {
    background-color: #fff3cd;
    font-weight: 600;
}
/* Libellé absence dans le planning */
.absence-label {
    font-size: 0.50rem; /* plus petit que .small */
    font-weight: 600;
    line-height: 1;
    opacity: 0.85;
    white-space: nowrap;
    pointer-events: none;
}
@media print {

    /* 1) Impression en paysage */
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    /* 2) On enlève le scroll horizontal à l'impression */
    .absence-grid-wrap {
        overflow: visible !important;
    }

    /* 3) On force l'impression à utiliser toute la largeur */
    .absence-print-root {
        width: 100% !important;
    }

    /* 4) On "compresse" la grille pour qu'elle rentre */
    .absence-grid-header,
    .absence-grid-row {
        transform: scale(0.92);
        transform-origin: top left;
        width: max-content; /* garde la largeur calculée avant scale */
    }

    /* 5) (optionnel) un peu plus compact */
    .absence-day-cell {
        width: 28px !important;
        height: 22px !important;
        font-size: 0.62rem !important;
    }

    .absence-employee-cell {
        width: 200px !important;
        font-size: 0.75rem !important;
    }
}
@media print {
    /* Ne jamais isoler le header en page de garde */
    .report-header,
    .employee-header,
    .report-title-block {
        page-break-after: avoid !important;
        break-after: avoid !important;
        margin-bottom: 6mm !important;
    }

        /* Empêche un saut de page entre le header et le tableau */
        .report-header + table,
        .employee-header + table,
        .report-title-block + table,
        .report-header + .table-responsive,
        .employee-header + .table-responsive,
        .report-title-block + .table-responsive {
            page-break-before: avoid !important;
            break-before: avoid !important;
        }

    /* Évite qu'un conteneur prenne toute la hauteur et pousse le tableau page 2 */
    .report-header,
    .employee-header,
    .report-title-block {
        height: auto !important;
        min-height: 0 !important;
    }
}
/* ===== HEADER TICKS : alignement propre ===== */
.planning-tick-cell {
    vertical-align: bottom;
    padding: 0 !important;
    height: 26px; /* fixe la hauteur du header */
}

    .planning-tick-cell .tick-label {
        display: block;
        height: 26px;
        line-height: 26px; /* centre verticalement dans le header */
        padding: 0 2px;
        transform: translateY(0); /* sécurité */
    }
/* Empêche tout débordement dans l'en-tête */
.planning-tick-cell {
    overflow: hidden;
}

    .planning-tick-cell .tick-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
    }

    /* Si tu mets une classe sur la dernière colonne (recommandé) */
    .planning-tick-cell.is-last .tick-label {
        text-align: right;
        padding-right: 2px;
    }
/* test */
.planning-print-root {
    overflow: visible !important;
    transform: none !important;
}

.planning-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020; /* ✅ sous le backdrop (1050) et le modal (1055) */
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 6px 14px rgba(0,0,0,.06);
}


    .planning-sticky-header > .d-flex {
        margin-bottom: 0 !important;
    }
/* Sticky planning sous la navbar */
.planning-sticky-toolbar {
    position: sticky;
    top: 118px; /* ajuste si besoin */
    z-index: 900;
    background: #fff;
    padding-top: .5rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 6px 14px rgba(0,0,0,.06);
}
/* site.css */
.login-card {
    padding: 32px;
}
/* =========================
   Z-INDEX : compatible Bootstrap (modal > navbar)
   ========================= */

/* Navbar fixed-top : valeur Bootstrap (1030) */
.app-navbar {
    z-index: 1030 !important;
}

/* Dropdown au-dessus de la navbar, mais sous le backdrop (1050) */
.navbar .dropdown-menu {
    z-index: 1040 !important;
}

/* Ton bandeau sticky du planning : sous navbar + sous backdrop/modal */
.planning-sticky-toolbar {
    position: sticky;
    top: 118px;
    z-index: 1020 !important; /* < 1030 navbar ; < 1050 backdrop */
    background: #fff;
    padding-top: .5rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 6px 14px rgba(0,0,0,.06);
}
/* ✅ Sécurité : menu principal visible */
.app-navbar .navbar-collapse {
    display: flex !important;
}

.app-navbar .main-nav {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}
/* =========================
   QUILL COMPACT (20–30 lignes max)
========================= */

.quill-compact {
    max-height: 240px; /* ≈ 20–25 lignes */
    overflow-y: auto;
    background: #fff;
}

    .quill-compact .ql-editor {
        padding: 8px 10px;
        font-size: 0.9rem;
        line-height: 1.4;
    }

.ql-toolbar.ql-snow {
    padding: 4px 6px;
}

.ql-container {
    border-radius: 0 0 .375rem .375rem;
}
/* Images dans le contenu Quill */
.quill-compact .ql-editor img,
.home-hero-content img {
    max-width: 100%;
    height: auto;
    max-height: 220px; /* ✅ limite hauteur */
    object-fit: contain;
    display: block;
    margin: .5rem auto; /* centré */
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
}
.home-hero-content.ql-editor img,
.ql-editor img {
    max-width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    display: block;
    margin: .5rem auto;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
}
.tips-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    line-height: 32px;
    text-align: center;
}

/* =========================================================
   VUE "PLANNING DES TÂCHES" : grille verticale (heures / quarts)
   ========================================================= */
.task-timeline .time-grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    pointer-events: none;
    background: rgba(0,0,0,.06);
}

.task-timeline .time-grid-line.time-grid-hour {
    background: rgba(0,0,0,.12);
}

.task-timeline .time-grid-line.time-grid-quarter {
    background: rgba(0,0,0,.05);
}
/* ===== Réduction bouton Tips ( ? dans le cercle ) ===== */
/* marche pour <a> ou <button> */
.tips-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important; /* utile si Bootstrap .btn */
    min-height: 22px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important; /* taille du ? */
    line-height: 1 !important;
}

    /* si tu as un <i> (Bootstrap icon) ou un <svg> dedans */
    .tips-btn i,
    .tips-btn svg {
        font-size: 12px !important;
        width: 12px !important;
        height: 12px !important;
    }