
/* ----------------- CSS partie 1/2 ----------------- */
/* ============================================================
   GRILLES PRINCIPALES (PC / TABLETTE)
   ============================================================ */
    .day-user {
        color: #9ca3af;
        font-weight: 600;
        margin-left: 6px;
    }

    .pdf-icon {
        font-size: 1.4rem;
        color: #d32f2f;
        opacity: 0.85;
        transition: opacity 0.15s ease, transform 0.15s ease;
        vertical-align: middle;
    }

    .btn-export-pdf:hover .pdf-icon {
        opacity: 1;
        transform: scale(1.08);
    }

/* Ancienne grille désactivée pour éviter les conflits */
.filters-grid {
    display: block !important;
    grid-template-columns: none !important;
}

/* ============================================================
   BOUTONS PRINCIPAUX (Afficher / Enregistrer)
   ============================================================ */
.btn-enregistrer,
.btn-afficher {
    height: 42px;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background-color: #DDE6F5;
    color: #080808;
    border: 1px solid #C7D3E8;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-enregistrer:hover,
.btn-afficher:hover {
    background-color: #99aac8;
    transform: translateY(-1px);
}

/* ============================================================
   BOUTON EXPORT PDF DU MOIS
   ============================================================ */
.btn-export-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: #DDE6F5;
    color: #080808;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    border: 1px solid #C7D3E8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-export-pdf:hover {
    background: #99aac8;
    transform: translateY(-1px);
}

/* ============================================================
   FILTRES — SYSTÈME UNIQUE : filters-row
   ============================================================ */

/* --- PC (>=1200px) --- */
@media (min-width: 1200px) {

    .filters-row {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        column-gap: 1rem;
        align-items: end;
    }

    .filters-row > div {
        width: 100%;
    }

    .filters-row select {
        width: 100%;
    }

    .btn-container-mobile {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }
}

/* --- Tablette (768px → 1199px) --- */
@media (min-width: 768px) and (max-width: 1199px) {

    .filters-row {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: end;
    }

    .filters-row > div {
        flex: 1 1 200px;
    }

    .btn-container-mobile {
        flex: 1 1 200px;
        display: flex;
        justify-content: flex-start;
    }
}

/* --- Mobile (<768px) --- */
@media (max-width: 767px) {

    .filters-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .filters-row > div {
        margin-bottom: 3px !important;
    }

    .btn-container-mobile {
        grid-column: 1 / -1;
        width: 100% !important;
        display: block !important;
        margin-top: 0.6rem !important;
    }

    .btn-afficher {
        width: 100% !important;
    }
}

/* ============================================================
   RÉCAP GÉNÉRAL
   ============================================================ */

/* PC : 3 cartes sur une ligne */
@media (min-width: 1200px) {
    .recap-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 1rem;
        align-items: stretch;
    }
}

/* Mobile : bloc compact */
@media (max-width: 767px) {

    .recap-row {
        display: block !important;
        padding: 16px !important;
        border-radius: 16px !important;
        background: #ffffff !important;
        box-shadow:
            0 2px 4px rgba(0,0,0,0.06),
            0 6px 12px rgba(0,0,0,0.08) !important;
        font-size: 0.5rem !important;
        line-height: 1.3 !important;
    }

    .recap-row .global-normal,
    .recap-row .global-supp,
    .recap-row .global-total {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        color: #111 !important;
    }

    .recap-row article {
        padding: 1px 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .recap-row article + article {
        margin-top: 10px !important;
        border-top: 1px solid rgba(0,0,0,0.08) !important;
        padding-top: 10px !important;
    }
}

/* ============================================================
   GRILLE DES CHAMPS HORAIRES (day-entry-grid)
   ============================================================ */

/* PC : 4 colonnes */
@media (min-width: 1200px) {

    .day-entry-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        column-gap: 1rem;
        row-gap: 0.5rem;
    }

    .day-entry-grid > div {
        width: 100%;
    }

    .btn-enregistrer {
        width: 100% !important;
    }
}

/* Mobile : 2 colonnes ultra compact */
@media (max-width: 767px) {

    .day-entry-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 0px !important;
        column-gap: 0.3rem !important;
        padding: 0 !important;
    }

    .day-entry-grid > div {
        margin-bottom: 0px !important;
    }

    .day-entry-grid label,
    .day-entry-grid x-input-label {
        margin-bottom: 1px !important;
        font-size: 0.82rem !important;
    }

    .btn-enregistrer {
        width: 10.7rem !important;
        flex-shrink: 0 !important;
        height: 42px !important;
        padding: 0 14px !important;
    }

    .day-entry-grid > div:last-child {
        display: flex !important;
        justify-content: flex-end !important;
        margin-top: 1px !important;
    }
}

/* ============================================================
   POPUP — STYLES GLOBAUX
   ============================================================ */
.popup-title {
    font-weight: 700;
}

.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: popup-fade 0.25s ease-out;
}

.popup-window {
    animation: popup-scale 0.25s ease-out;
}

.popup-content {
    white-space: pre-line;
    margin-bottom: 18px;
}

.popup-content strong {
    font-weight: 700;
    display: inline-block;
    opacity: 0;
    transform: translateY(-22px);
    transition: opacity 2.2s ease-out, transform 2.2s ease-out;
}

.popup-content strong.icon-animate {
    opacity: 1;
    transform: translateY(0);
}

.popup-button {
    width: 100%;
    padding: 10px 0;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
}

@keyframes popup-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes popup-scale {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ----------------- CSS partie 2/2 ----------------- */
/* ============================================================
   POPUP — VARIANTS
   ============================================================ */
.popup-overlay.macos {
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
}

.popup-overlay.macos .popup-window {
    background: rgba(255,255,255,0.75);
    backdrop-filter: saturate(180%) blur(20px);
    border-radius: 14px;
    padding: 22px 26px;
    width: 340px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.popup-overlay.macos .popup-title {
    color: #1f3a5f;
}

.popup-overlay.macos .popup-button {
    background: #007aff;
    color: white;
    border-radius: 8px;
}

.popup-overlay.macos .popup-button:hover {
    background: #006ae6;
}

.popup-overlay.material {
    background: rgba(0,0,0,0.35);
}

.popup-overlay.material .popup-window {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    width: 360px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.popup-overlay.material .popup-title {
    color: #333;
}

.popup-overlay.material .popup-button {
    background: #6200ee;
    color: white;
    border-radius: 6px;
}

.popup-overlay.material .popup-button:hover {
    background: #4b00c9;
}

.popup-overlay.finder {
    background: rgba(0,0,0,0.40);
    backdrop-filter: blur(4px);
}

.popup-overlay.finder .popup-window {
    background: #f2f2f2;
    border-radius: 10px;
    padding: 18px 22px;
    width: 320px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

.popup-overlay.finder .popup-title {
    color: #2c3e50;
}

.popup-overlay.finder .popup-button {
    background: #e0e0e0;
    border-radius: 6px;
    color: #333;
}

.popup-overlay.finder .popup-button:hover {
    background: #d5d5d5;
}

.popup-overlay.minimal {
    background: rgba(0,0,0,0.25);
}

.popup-overlay.minimal .popup-window {
    background: white;
    border-radius: 6px;
    padding: 16px;
    width: 300px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.popup-overlay.minimal .popup-title {
    color: #111;
}

.popup-overlay.minimal .popup-button {
    background: black;
    color: white;
    border-radius: 4px;
}

.popup-overlay.minimal .popup-button:hover {
    background: #333;
}

.popup-overlay.ios17 {
    background: rgba(0,0,0,0.40);
    backdrop-filter: blur(18px);
}

.popup-overlay.ios17 .popup-window {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(22px) saturate(180%);
    border-radius: 18px;
    padding: 24px 28px;
    width: 340px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}

.popup-overlay.ios17 .popup-title {
    color: #2c3e50;
}

.popup-overlay.ios17 .popup-button {
    background: #0a84ff;
    color: white;
    border-radius: 12px;
}

.popup-overlay.ios17 .popup-button:hover {
    background: #0066d6;
}

.popup-overlay.mica {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(30px) saturate(180%);
}

.popup-overlay.mica .popup-window {
    background: rgba(255,255,255,0.60);
    border-radius: 12px;
    padding: 22px 26px;
    width: 350px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.20);
}

.popup-overlay.mica .popup-title {
    color: #1a1a1a;
}

.popup-overlay.mica .popup-button {
    background: #0a84ff;
    color: white;
    border-radius: 8px;
}

.popup-overlay.mica .popup-button:hover {
    background: #006edc;
}

.popup-overlay.glassmorphism {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(25px);
}

.popup-overlay.glassmorphism .popup-window {
    background: rgba(255,255,255,0.20);
    backdrop-filter: blur(30px);
    border-radius: 20px;
    padding: 24px 30px;
    width: 360px;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}

.popup-overlay.glassmorphism .popup-title {
    color: #ffffff;
}

.popup-overlay.glassmorphism .popup-button {
    background: rgba(255,255,255,0.35);
    color: #000;
    border-radius: 10px;
}

.popup-overlay.glassmorphism .popup-button:hover {
    background: rgba(255,255,255,0.55);
}

/* ============================================================
   COMMENTAIRE (PC) + boutons +/-
   ============================================================ */
.comment-textarea {
    min-height: 42px;
    resize: vertical;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    background: white;
}

.comment-mobile-controls {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1px !important;
}

.comment-mobile-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #99f6e4;
    color: #0f766e;
    background: #f0fdfa;
    font-size: 1rem;
    font-weight: 700;
}

/* Sur desktop, on masque les boutons +/– */
@media (min-width: 768px) {
    .comment-mobile-controls {
        display: none;
    }
}

/* ============================================================
   BOUTON SCROLL TOP (Remonter)
   ============================================================ */
.btn-scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #DDE6F5;
    color: #080808;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 9999px;
    border: 1px solid #C7D3E8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-scroll-top:hover {
    background: #99aac8;
    transform: translateY(-2px);
}

/* Mobile : bouton Remonter plus compact */
@media (max-width: 767px) {
    .btn-scroll-top {
        bottom: 1rem !important;
        right: 1rem !important;
        padding: 0.6rem 0.9rem !important;
        font-size: 0.9rem !important;
    }
}

/* ============================================================
   ANIMATIONS & ERREURS
   ============================================================ */
.value-updated {
    background-color: #d9f7d9;
    transition: background-color 4s ease;
}

.time-error {
    border: 2px solid #e74c3c !important;
    border-radius: 6px;
    transition: border-color 0.25s ease;
}

.time-error-icon {
    color: #e74c3c;
    font-size: 18px;
    margin-left: 6px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.time-error-icon.visible {
    opacity: 1;
}


/* ============================================================
   🎨 STYLE 1 — macOS (verre, blur, arrondi, bleu Apple)
   ============================================================ */
    .popup-overlay.macos {
        background: rgba(0,0,0,0.45);
        backdrop-filter: blur(6px);
    }

    .popup-overlay.macos .popup-window {
        background: rgba(255,255,255,0.75);
        backdrop-filter: saturate(180%) blur(20px);
        border-radius: 14px;
        padding: 22px 26px;
        width: 340px;
        box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    }

    .popup-overlay.macos .popup-title {
        color: #1f3a5f;
    }

    .popup-overlay.macos .popup-button {
        background: #007aff;
        color: white;
        border-radius: 8px;
    }

    .popup-overlay.macos .popup-button:hover {
        background: #006ae6;
    }

/* ============================================================
   🎨 STYLE 2 — Material Design (Google)
   ============================================================ */
    .popup-overlay.material {
        background: rgba(0,0,0,0.35);
    }

    .popup-overlay.material .popup-window {
        background: #fff;
        border-radius: 12px;
        padding: 20px;
        width: 360px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    }

    .popup-overlay.material .popup-title {
        color: #333;
    }

    .popup-overlay.material .popup-button {
        background: #6200ee;
        color: white;
        border-radius: 6px;
    }

    .popup-overlay.material .popup-button:hover {
        background: #4b00c9;
    }

/* ============================================================
   🎨 STYLE 3 — Finder (macOS boîte de dialogue classique)
   ============================================================ */
    .popup-overlay.finder {
        background: rgba(0,0,0,0.40);
        backdrop-filter: blur(4px);
    }

    .popup-overlay.finder .popup-window {
        background: #f2f2f2;
        border-radius: 10px;
        padding: 18px 22px;
        width: 320px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    }

    .popup-overlay.finder .popup-title {
        color: #2c3e50;
    }

    .popup-overlay.finder .popup-button {
        background: #e0e0e0;
        border-radius: 6px;
        color: #333;
    }

    .popup-overlay.finder .popup-button:hover {
        background: #d5d5d5;
    }

/* ============================================================
   🎨 STYLE 4 — Minimaliste (sobre, propre)
   ============================================================ */
    .popup-overlay.minimal {
        background: rgba(0,0,0,0.25);
    }

    .popup-overlay.minimal .popup-window {
        background: white;
        border-radius: 6px;
        padding: 16px;
        width: 300px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    }

    .popup-overlay.minimal .popup-title {
        color: #111;
    }

    .popup-overlay.minimal .popup-button {
        background: black;
        color: white;
        border-radius: 4px;
    }

    .popup-overlay.minimal .popup-button:hover {
        background: #333;
    }

/* ============================================================
   🎨 STYLE 5 — iOS 17 (verre doux, pastel, arrondi)
   ============================================================ */
    .popup-overlay.ios17 {
        background: rgba(0,0,0,0.40);
        backdrop-filter: blur(18px);
    }

    .popup-overlay.ios17 .popup-window {
        background: rgba(255,255,255,0.65);
        backdrop-filter: blur(22px) saturate(180%);
        border-radius: 18px;
        padding: 24px 28px;
        width: 340px;
        box-shadow: 0 12px 32px rgba(0,0,0,0.22);
    }

    .popup-overlay.ios17 .popup-title {
        color: #2c3e50;
    }

    .popup-overlay.ios17 .popup-button {
        background: #0a84ff;
        color: white;
        border-radius: 12px;
    }

    .popup-overlay.ios17 .popup-button:hover {
        background: #0066d6;
    }

/* ============================================================
   🎨 STYLE 6 — Windows 11 Mica (transparence texturée)
   ============================================================ */
    .popup-overlay.mica {
        background: rgba(255,255,255,0.55);
        backdrop-filter: blur(30px) saturate(180%);
    }

    .popup-overlay.mica .popup-window {
        background: rgba(255,255,255,0.60);
        border-radius: 12px;
        padding: 22px 26px;
        width: 350px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.20);
    }

    .popup-overlay.mica .popup-title {
        color: #1a1a1a;
    }

    .popup-overlay.mica .popup-button {
        background: #0a84ff;
        color: white;
        border-radius: 8px;
    }

    .popup-overlay.mica .popup-button:hover {
        background: #006edc;
    }

/* ============================================================
   🎨 STYLE 7 — Glassmorphism (verre futuriste)
   ============================================================ */
    .popup-overlay.glassmorphism {
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(25px);
    }

    .popup-overlay.glassmorphism .popup-window {
        background: rgba(255,255,255,0.20);
        backdrop-filter: blur(30px);
        border-radius: 20px;
        padding: 24px 30px;
        width: 360px;
        border: 1px solid rgba(255,255,255,0.35);
        box-shadow: 0 16px 40px rgba(0,0,0,0.25);
    }

    .popup-overlay.glassmorphism .popup-title {
        color: #ffffff;
    }

    .popup-overlay.glassmorphism .popup-button {
        background: rgba(255,255,255,0.35);
        color: #000;
        border-radius: 10px;
    }

    .popup-overlay.glassmorphism .popup-button:hover {
        background: rgba(255,255,255,0.55);
    }

    /* Pour changer de style de la popup affichage, modifier la classe :

     macos         → style verre / blur / arrondi Apple (macOS Sonoma)
     material      → style Google Material Design
     finder        → style boîte de dialogue macOS classique
     minimal       → style sobre, épuré
     ios17         → style iOS 17 (verre doux, arrondi, pastel)
     mica          → style Windows 11 Mica (transparence texturée)
     glassmorphism → style verre futuriste (blur + transparence + bord lumineux)

     Exemple :
     <div id="update-popup" class="popup-overlay macos">
     <div id="update-popup" class="popup-overlay material">
     <div id="update-popup" class="popup-overlay finder">
     <div id="update-popup" class="popup-overlay minimal">
     <div id="update-popup" class="popup-overlay ios17">
     <div id="update-popup" class="popup-overlay mica">
     <div id="update-popup" class="popup-overlay glassmorphism">

     dans : resources/views/components/text-input.blade.php 
                                            ICI
     <div id="update-popup" class="popup-overlay macos">
    <div class="popup-window">
        <div class="popup-header">
            <span class="popup-icon">⤵️</span>
            <span class="popup-title">L'application affiche maintenant...</span>
        </div>

        <div id="popup-content" class="popup-content"></div>

        <button id="popup-ok" class="popup-button">OK</button>
    </div>
</div>
  */