    /* Fallback si Font Awesome non disponible : les icônes disparaissent sans casser le layout */
    

        /* ═══════════════ ÉDITION EN LIGNE ═══════════════ */
        .cel-edit {
            cursor: pointer;
            position: relative;
            transition: background 0.1s;
        }
        .cel-edit:hover {
            background: #fffde7 !important;
            outline: 1px dashed #f9a825;
        }
        .cel-edit.en-cours {
            background: #e3f2fd !important;
            outline: 2px solid #1565c0;
            padding: 2px !important;
        }
        .cel-edit input.cel-inp {
            width: 100%;
            border: none;
            background: transparent;
            font-size: inherit;
            font-family: inherit;
            padding: 2px 4px;
            outline: none;
            color: #1a237e;
            font-weight: 600;
        }
        .cel-edit select.cel-sel {
            width: 100%;
            border: none;
            background: transparent;
            font-size: inherit;
            font-family: inherit;
            padding: 2px 4px;
            outline: none;
            color: #1a237e;
            font-weight: 600;
            cursor: pointer;
        }
        .cel-edit .cel-saved {
            position: absolute;
            top: 2px;
            right: 2px;
            color: #43A047;
            font-size: 0.75em;
            animation: celFade 1.5s forwards;
        }
        @keyframes celFade {
            0%  { opacity:1; }
            70% { opacity:1; }
            100%{ opacity:0; }
        }
        .cel-select-dyn .cel-sel-inp {
            width: 100%;
            border: 1.5px solid #667eea;
            border-radius: 6px;
            padding: 3px 6px;
            font-size: 0.85em;
            color: #1a237e;
            cursor: pointer;
        }

        /* ═══════════════ DOCUMENTS — CARTES ADMIN ═══════════════ */
        .doc-admin-carte {
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 14px;
            padding: 18px 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.18s;
            text-align: center;
        }
        .doc-admin-carte:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
        .dac-ico {
            width: 50px; height: 50px;
            border-radius: 13px;
            display: flex; align-items: center; justify-content: center;
            color: white; font-size: 1.4em;
            box-shadow: 0 3px 8px rgba(0,0,0,0.18);
        }
        .dac-lbl { font-weight: 700; font-size: 0.85em; color: #333; line-height: 1.3; }
        .dac-sub { font-size: 0.75em; color: #888; }

        /* ═══════════════ DOCUMENTS — CARTES ═══════════════ */
        #docs-cartes-selection > div:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
        }
        #docs-cartes-selection > div.actif {
            background: #f0f4ff !important;
            border-color: #667eea !important;
            box-shadow: 0 4px 16px rgba(102,126,234,0.25) !important;
        }
        .attest-carte {
            background: white;
            border: 2px solid #e8e8e8;
            border-radius: 12px;
            padding: 14px 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.15s;
            text-align: center;
            font-size: 0.82em;
            font-weight: 600;
            color: #333;
        }
        .attest-carte:hover {
            border-color: var(--ac, #667eea);
            background: #f8f9ff;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .attest-carte.selectionne {
            border-color: var(--ac, #667eea);
            background: #f0f4ff;
            box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
        }
        /* ═══════════════ PAGE MENU ACCORDÉON ═══════════════ */
        .smenu-bloc {
            background: white;
            border-radius: 14px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.07);
            overflow: hidden;
        }
        .smenu-titre {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 18px;
            cursor: pointer;
            font-weight: 700;
            font-size: 0.95em;
            color: #1a237e;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.15s;
        }
        .smenu-titre:hover { background: #f0f4ff; }
        .smenu-ico { margin-right: 10px; font-size: 1.1em; }
        .smenu-chevron {
            color: #888;
            font-size: 0.85em;
            transition: transform 0.25s;
        }
        .smenu-chevron.ouvert { transform: rotate(180deg); }
        .smenu-corps {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            border-top: 1px solid #f0f0f0;
        }
        .smenu-corps.ouvert { max-height: 600px; }
        .smenu-grille {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            gap: 12px;
            padding: 14px 16px;
        }
        .smenu-tuile {
            background: #f8f9ff;
            border-radius: 12px;
            padding: 14px 8px 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s;
            border: 1.5px solid #e8eaf6;
            -webkit-tap-highlight-color: transparent;
        }
        .smenu-tuile:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); border-color: #667eea; }
        .smenu-tuile:active { transform: scale(0.95); }
        .smt-ico {
            width: 48px; height: 48px;
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.3em; color: white;
            box-shadow: 0 3px 8px rgba(0,0,0,0.18);
        }
        .smt-lbl { font-weight: 700; font-size: 0.8em; color: #333; text-align: center; line-height: 1.3; }
        .smt-stat { font-size: 0.72em; color: #888; font-weight: 600; min-height: 14px; }
        .menu-tuile-disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.7); }
        .menu-tuile-disabled:hover { transform: none; box-shadow: none; border-color: #e8eaf6; }
        @media (max-width: 480px) {
            .smenu-grille { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px; }
            .smt-ico { width: 40px; height: 40px; font-size: 1.1em; }
        }

        /* ═══════════════ PAGE MENU TUILES ═══════════════ */
        .menu-tuile {
            background: white;
            border-radius: 16px;
            padding: 20px 14px 16px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: transform 0.18s, box-shadow 0.18s;
            box-shadow: 0 2px 10px rgba(0,0,0,0.08);
            border: 2px solid transparent;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }
        .menu-tuile:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.14);
            border-color: var(--tc, #667eea);
            background: var(--tl, #f0f4ff);
        }
        .menu-tuile:active { transform: scale(0.96); }
        .menu-tuile-icone {
            width: 60px;
            height: 60px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.6em;
            color: white;
            box-shadow: 0 4px 12px rgba(0,0,0,0.18);
        }
        .menu-tuile-label {
            font-weight: 700;
            font-size: 0.85em;
            color: #333;
            text-align: center;
            line-height: 1.3;
        }
        .menu-tuile-stat {
            font-size: 0.78em;
            color: #888;
            font-weight: 600;
            min-height: 16px;
        }
        .menu-tuile-disabled {
            opacity: 0.4;
            cursor: not-allowed;
            filter: grayscale(0.7);
        }
        .menu-tuile-disabled:hover {
            transform: none;
            box-shadow: 0 2px 10px rgba(0,0,0,0.08);
            border-color: transparent;
            background: white;
        }
        @media (max-width: 600px) {
            .menu-tuile-icone { width: 50px; height: 50px; font-size: 1.3em; }
            .menu-tuile { padding: 16px 10px 12px; border-radius: 12px; }
        }

/* ═══ FILIGRANE ARMOIRIES GLOBAL (documents imprimés) ═══ */
.doc-filigrane-armoiries {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 50% !important;
    pointer-events: none !important;
    z-index: 0 !important;
    opacity: 0.07 !important;
    overflow: hidden;
}
.doc-filigrane-armoiries img {
    width: 100%;
    height: auto;
    display: block;
}
@media print {
    .doc-filigrane-armoiries {
        opacity: 0.07 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ═══════ AMÉLIORATIONS EDT ═══════ */
.et-hbar-wrap{margin-bottom:10px;}
.et-hbar-wrap .et-hb-info{display:flex;justify-content:space-between;font-size:.8em;margin-bottom:3px;color:#444;}
.et-hbar-wrap .et-hb-info strong{font-weight:600;color:#222;}
.et-hbar{height:8px;border-radius:5px;background:#e9ecef;overflow:hidden;}
.et-hbar-fill{height:100%;border-radius:5px;background:#667eea;transition:width .4s;}
.et-hbar-fill.complet{background:#28a745;}
.et-hbar-fill.over{background:#dc3545;}
.et-hbar-fill.vide{background:#ccc;}
.et-cf-item{display:flex;align-items:flex-start;gap:9px;padding:9px 12px;border-radius:8px;margin-bottom:7px;font-size:.85em;line-height:1.4;}
.et-cf-item.rouge{background:#fde8e8;border-left:3px solid #e02424;}
.et-cf-item.orange{background:#fff7ed;border-left:3px solid #f97316;}
.et-cf-item.jaune{background:#fef3c7;border-left:3px solid #d97706;}
.et-cf-item.vert{background:#def7ec;border-left:3px solid #0e9f6e;color:#065f46;}
.et-prof-quota{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:8px;background:#f8f9ff;border:1px solid #e0e4ff;margin-bottom:7px;font-size:.85em;}
.et-prof-quota .eq-nom{font-weight:600;min-width:160px;}
.et-prof-quota .eq-bar-wrap{flex:1;}
.et-prof-quota .eq-badge{font-size:.75em;font-weight:700;padding:2px 8px;border-radius:12px;white-space:nowrap;}
.eq-badge.ok{background:#def7ec;color:#0e9f6e;}
.eq-badge.warn{background:#fef3c7;color:#92400e;}
.eq-badge.over{background:#fde8e8;color:#e02424;}
.et-salle-grid{overflow-x:auto;}
.et-salle-grid table{width:100%;border-collapse:collapse;font-size:.83em;min-width:600px;}
.et-salle-grid th{background:#667eea;color:#fff;padding:8px 6px;text-align:center;font-size:.83em;}
.et-salle-grid td{border:1px solid #e0e0e0;vertical-align:top;padding:2px;height:55px;}
.et-salle-grid .col-h{background:#f5f7ff;color:#555;font-weight:600;text-align:center;font-size:.78em;border-right:2px solid #ddd;width:85px;}
.et-salle-cell{border-radius:5px;padding:4px 5px;height:100%;min-height:49px;display:flex;flex-direction:column;justify-content:center;}
.et-salle-cell .sc-mat{font-weight:700;font-size:.79em;line-height:1.2;}
.et-salle-cell .sc-cls{font-size:.72em;opacity:.85;margin-top:2px;}
.et-salle-cell .sc-prf{font-size:.7em;opacity:.7;margin-top:1px;}
.et-salle-empty{background:#fafafa;display:flex;align-items:center;justify-content:center;height:100%;border-radius:5px;color:#ccc;font-size:.75em;}
/* couleurs matières pour salle */
.sc-c0{background:#dbeafe;color:#1e40af;} .sc-c1{background:#dcfce7;color:#166534;}
.sc-c2{background:#fef9c3;color:#854d0e;} .sc-c3{background:#fce7f3;color:#9d174d;}
.sc-c4{background:#ede9fe;color:#5b21b6;} .sc-c5{background:#ffedd5;color:#9a3412;}
.sc-c6{background:#d1fae5;color:#065f46;} .sc-c7{background:#e0f2fe;color:#075985;}
.sc-c8{background:#f3e8ff;color:#6b21a8;} .sc-c9{background:#fef3c7;color:#92400e;}

        * { box-sizing: border-box; margin: 0; padding: 0; }
        /* Permettre le copier-coller dans tout le document */
        body, .page, table, td, th, p, span, div { -webkit-user-select: text !important; user-select: text !important; }
        button, input[type=button], input[type=submit], input[type=checkbox], input[type=radio], select, nav, header { -webkit-user-select: none; user-select: none; }
        body { font-family: 'Poppins', 'Segoe UI', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
        header { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); color: white; padding: 0.6rem 1.5rem; display: flex; align-items: center; gap: 15px; flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,0.2); }
        .logo-container { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 40px; }
        #logoPreview { max-height: 44px; max-width: 130px; border-radius: 8px; }
        .logo-btn { background: rgba(255,255,255,0.3); color: white; border: none; padding: 5px 10px; border-radius: 20px; cursor: pointer; }
        .expiration-badge { background: #ffd700; color: #333; padding: 4px 12px; border-radius: 30px; font-size: 0.85rem; cursor: pointer; white-space:nowrap; }
        .expiration-badge:hover { background: #ffed4a; }
        .warning-message { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 20px; border-radius: 10px; box-shadow: 0 0 20px rgba(0,0,0,0.3); z-index: 10000; max-width: 400px; text-align: center; }
        .warning-message i { font-size: 40px; margin-bottom: 10px; }
        .warning-message.warning-1 { border-left: 5px solid #ffc107; }
        .warning-message.warning-2 { border-left: 5px solid #dc3545; }
        /* === LAYOUT PRINCIPAL === */
        .app-body { display: flex; flex: 1; overflow: hidden; }
        nav { background: rgba(0,0,0,0.25); padding: 8px 5px; display: flex; flex-direction: column; gap: 4px; width: 155px; flex-shrink: 0; overflow-y: auto; backdrop-filter: blur(5px); border-right: 1px solid rgba(255,255,255,0.1); }
        nav button { background: rgba(255,255,255,0.12); border: none; color: white; padding: 7px 10px; border-radius: 20px; cursor: pointer; font-weight: 500; transition: all 0.25s; font-size: 0.78em; text-align: left; white-space: nowrap; }
        nav button i { margin-right: 5px; width: 14px; }
        nav button.active-nav { background: #ffd700; color: #333; box-shadow: 0 3px 10px rgba(255,215,0,0.4); }
        nav button:hover { background: rgba(255,255,255,0.28); }
        .page-container { flex: 1; overflow-y: auto; overflow-x: auto; padding: 16px 20px; background: #f0f2f8; }
        .page { display: none; }
        .page.active { display: block !important; min-height: 200px; visibility: visible !important; }
        .dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
        .stat-card { background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-radius: 20px; padding: 25px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); transition: transform 0.3s; border: 1px solid rgba(255,255,255,0.3); }
        .stat-card:hover { transform: translateY(-5px); }
        .stat-icon { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
        .stat-icon i { font-size: 30px; color: white; }
        .stat-value { font-size: 2.5em; font-weight: bold; color: #333; margin: 10px 0; }
        .stat-label { color: #666; font-size: 1.1em; text-transform: uppercase; letter-spacing: 1px; }
        .chart-container { background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-radius: 20px; padding: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); margin-top: 20px; }
        h2 { color: white; font-size: 1.7em; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
        h2 i { margin-right: 10px; }
        h3 { color: #333; margin: 15px 0; }
        h4 { color: #333; margin: 10px 0; }
        .section-card { background: #ffffff !important; border-radius: 24px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important; margin-bottom: 20px; display: block !important; visibility: visible !important; opacity: 1 !important; }
        .toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 15px 0; background: rgba(102,126,234,0.1); backdrop-filter: blur(5px); padding: 12px 20px; border-radius: 40px; }
        .toolbar button, .btn { background: #667eea; color: white; border: none; padding: 8px 20px; border-radius: 30px; cursor: pointer; font-weight: 500; transition: all 0.3s; }
        .toolbar button:hover, .btn:hover { background: #764ba2; transform: translateY(-2px); }
        .btn.small { padding: 4px 12px; background: #17a2b8; }
        .btn.warning { background: #fd7e14; }
        .btn.success { background: #28a745; }
        .btn.danger { background: #dc3545; }
        .btn.excel { background: #1d6f42; }
        .btn.pdf { background: #d32f2f; }
        .btn.download { background: #17a2b8; }
        input, select, textarea { padding: 8px 15px; border: 1px solid #ddd; border-radius: 30px; font-size: 0.95rem; width: 100%; background: white; color: #333; }
        input[type="checkbox"], input[type="radio"] { width: auto !important; padding: 0 !important; border: none !important; border-radius: 0 !important; height: auto !important; min-width: unset !important; }
        .form-row { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; background: rgba(102,126,234,0.05); padding: 15px; border-radius: 50px; margin: 15px 0; }
        .form-group { margin-bottom: 15px; }
        .form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: #333; }
        table { width: 100%; border-collapse: collapse; background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 4px 10px #0000001a; }
        th { background: #667eea; color: white; font-weight: 500; padding: 12px; }
        td, th { border: none; padding: 10px; border-bottom: 1px solid #e0e0e0; color: #333; }
        td { color: #333; }
        .import-area { border: 2px dashed #667eea; border-radius: 40px; padding: 20px; text-align: center; background: white; margin: 20px 0; }
        .import-title { font-size: 1.3rem; font-weight: bold; color: #333; margin-bottom: 10px; }
        .import-subtitle { color: #667eea; font-size: 1rem; margin-bottom: 5px; }
        .import-description { color: #333; margin-bottom: 5px; font-size: 0.95rem; }
        .import-format { background: #f0f0f0; padding: 10px; border-radius: 20px; font-family: monospace; color: #333; margin: 10px 0; font-size: 0.9rem; }
        .import-example { color: #28a745; font-size: 0.9rem; margin-top: 5px; }
        .import-actions { display: flex; gap: 10px; justify-content: center; margin: 15px 0; flex-wrap: wrap; }
        .success-message { color: #28a745; font-weight: bold; margin: 10px 0; }
        .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(5px); }
        .modal-content { background: white; border-radius: 30px; padding: 30px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .modal-header h3 { color: #667eea; }
        .close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #666; }
        .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
        .facture { border: 2px solid #667eea; border-radius: 20px; padding: 20px; background: white; margin-top: 20px; }
        .facture-ligne { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #ccc; color: #333; }
        .toggle-switch { position: relative; display: inline-block; width: 60px; height: 34px; }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
        .toggle-slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked + .toggle-slider { background-color: #28a745; }
        input:checked + .toggle-slider:before { transform: translateX(26px); }
        .filter-container { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; background: white; padding: 14px 16px; border-radius: 40px; align-items: center; }
        .filter-container select, .filter-container input { background: white; border: 1px solid #667eea; min-width: 140px; flex: 1; }
        .delete-btn { background: #dc3545; color: white; border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
        .delete-btn:hover { background: #c82333; }
        .expired-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; z-index: 9999; }
        .expired-message { background: white; border-radius: 30px; padding: 40px; text-align: center; max-width: 500px; }
        .expired-message i { font-size: 80px; color: #dc3545; margin-bottom: 20px; }
        .expired-message h2 { color: #333; margin-bottom: 15px; }
        .expired-message p { color: #666; margin-bottom: 20px; }
        .select-all-header { background: #e9ecef; padding: 8px; border-radius: 8px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; color: #333; }
        .bulk-delete-btn { background: #dc3545; color: white; border: none; padding: 5px 15px; border-radius: 20px; cursor: pointer; }
        .checkbox-column { width: 40px; text-align: center; }
        .statuts-container, .evaluation-types-container { background: white; border-radius: 20px; padding: 15px; margin-top: 10px; border: 1px solid #667eea; }
        .statut-row, .eval-type-row, .eval-subtype-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; background: #f8f9fa; padding: 10px; border-radius: 20px; }
        .statut-list, .eval-type-list, .eval-subtype-list { margin-top: 10px; }
        .statut-item, .eval-type-item, .eval-subtype-item { display: flex; justify-content: space-between; align-items: center; background: #f8f9fa; padding: 8px; border-radius: 20px; margin-bottom: 5px; color: #333; }
        .statut-nom { flex: 2; color: #333; }
        .statut-delete { flex: 0; }
        .saisie-notes-table { width: 100%; border-collapse: collapse; min-width: 600px; }
        .saisie-notes-table th { background: #667eea; color: white; padding: 10px 14px; position: sticky; top: 0; white-space: nowrap; font-size: 0.92em; }
        .saisie-notes-table td { padding: 8px 12px; border-bottom: 1px solid #ddd; color: #333; white-space: nowrap; }
        .saisie-notes-table tr:nth-child(even) td { background: #f8f9ff; }
        .saisie-notes-table input { width: 70px; padding: 5px; border-radius: 5px; border: 1px solid #ccc; background: white; color: #333; }
        .saisie-notes-table select { width: 100%; padding: 5px; border-radius: 5px; background: white; color: #333; }
        .number-format { text-align: right; }
        .heure-input { width: 80px; }
        .evaluation-config { margin-top: 20px; padding: 15px; background: #f8f9fa; border-radius: 20px; border: 1px solid #667eea; }
        .type-header { font-weight: bold; color: #667eea; margin: 10px 0; }
        .montant-statut-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; background: #f8f9fa; padding: 10px; border-radius: 20px; }
        .montant-statut-row span { color: #333; }
        .montant-statut-list { margin-top: 10px; }
        .paiement-rubriques-box { background:#f8f9fa; border:1px solid #667eea; border-radius:20px; padding:12px; min-width:280px; flex:2; }
        .paiement-rubrique-row { display:flex; gap:10px; align-items:center; margin-bottom:8px; }
        .paiement-rubrique-row:last-child { margin-bottom:0; }
        .paiement-rubrique-row input[type="text"] { flex:2; }
        .paiement-rubrique-row input[type="number"] { flex:1; min-width:120px; }
        .paiement-rubrique-total { margin-top:10px; font-weight:700; color:#333; text-align:right; }

        /* ── Modules optionnels : checkboxes visibles ── */
        .module-toggle-label {
            display:flex; align-items:center; gap:12px;
            border-radius:12px; padding:14px 16px; cursor:pointer;
            transition:all 0.2s; user-select:none; position:relative;
        }
        .module-toggle-label input[type="checkbox"] {
            display:none;
        }
        .module-toggle-switch {
            width:46px; height:26px; border-radius:13px; background:#ccc;
            flex-shrink:0; position:relative; transition:background 0.25s;
            box-shadow:inset 0 1px 4px rgba(0,0,0,0.15);
        }
        .module-toggle-switch::after {
            content:''; position:absolute; top:3px; left:3px;
            width:20px; height:20px; border-radius:50%; background:white;
            transition:transform 0.25s; box-shadow:0 1px 4px rgba(0,0,0,0.25);
        }
        .module-toggle-label input:checked ~ .module-toggle-switch {
            background: var(--toggle-color, #667eea);
        }
        .module-toggle-label input:checked ~ .module-toggle-switch::after {
            transform: translateX(20px);
        }
        .module-toggle-label.active-module {
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        }
        .note-cell { background: #f8f9fa; }
        .moyenne-cell { background: #e3f2fd; font-weight: bold; }
        .total-cell { background: #c8e6c9; font-weight: bold; }
        .rang-cell { background: #fff3e0; font-weight: bold; }
        .eval-header { background: #667eea; color: white; padding: 5px; text-align: center; font-weight: bold; }
        .type-editor { background: #f8f9fa; border-radius: 20px; padding: 15px; margin-bottom: 15px; border: 1px solid #667eea; }
        .type-editor h5 { color: #667eea; margin-bottom: 10px; }
        .sous-type-item { display: flex; gap: 10px; margin-bottom: 5px; align-items: center; }
        .statut-filter { background: white; padding: 10px; border-radius: 30px; border: 1px solid #667eea; color: #333; }
        .info-text { color: #666; font-size: 0.9rem; margin-top: 5px; }
        .intervention-row { background: #f8f9fa; border-radius: 20px; padding: 10px; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
        .intervention-row select, .intervention-row input { flex: 1; min-width: 150px; }
        .sous-type-detail { font-size: 0.9em; color: #666; margin-left: 10px; }
        .rang-exposant { font-size: 0.8em; vertical-align: super; }
        
        /* Styles pour les statistiques par classe */
        .classe-stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        
        .classe-stat-card {
            background: white;
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            border: 1px solid #667eea;
            transition: transform 0.3s;
        }
        
        .classe-stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(102,126,234,0.3);
        }
        
        .classe-stat-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px;
            border-radius: 15px;
            margin-bottom: 15px;
            text-align: center;
        }
        
        .classe-stat-header h3 {
            color: white;
            margin: 0;
            font-size: 1.3em;
        }
        
        .classe-stat-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }
        
        .stat-item {
            text-align: center;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 10px;
        }
        
        .stat-item .stat-value {
            font-size: 1.8em;
            font-weight: bold;
            color: #667eea;
            margin: 5px 0;
        }
        
        .stat-item .stat-label {
            color: #666;
            font-size: 0.9em;
        }
        
        .statut-stats {
            grid-column: span 2;
            margin-top: 10px;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 10px;
        }
        
        .statut-item {
            display: flex;
            justify-content: space-between;
            padding: 5px 0;
            border-bottom: 1px dashed #ddd;
        }
        
        /* Styles pour les tableaux synoptiques */
        .synoptique-container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            page-break-after: always;
        }
        
        .synoptique-header {
            text-align: center;
            margin-bottom: 30px;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 15px;
        }
        
        .synoptique-header h1 {
            color: white;
            margin: 5px 0;
            font-size: 1.8em;
        }
        
        .synoptique-header h2 {
            color: #ffd700;
            margin: 5px 0;
            font-size: 1.4em;
        }
        
        .synoptique-header p {
            margin: 5px 0;
            font-size: 1.1em;
        }
        
        .synoptique-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        
        .synoptique-table th {
            background: #667eea;
            color: white;
            padding: 10px;
            text-align: center;
        }
        
        .synoptique-table td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: center;
        }
        
        .synoptique-table tr:nth-child(even) {
            background: #f8f9fa;
        }
        
        .observation {
            margin: 20px 0;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
        }
        
        .observation textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #667eea;
            border-radius: 10px;
            resize: vertical;
        }
        
        .signatures {
            margin-top: 40px;
            display: flex;
            justify-content: space-between;
            padding: 0 50px;
        }
        
        .signature-line {
            width: 200px;
            text-align: center;
        }
        .signature-line > span, .signature-line > div:first-child {
            display: block;
            font-weight: 600;
            margin-bottom: 6px;
        }
        
        /* Styles pour les bulletins */
        .bulletin-container {
            max-width: 1200px;
            margin: 0 auto 30px;
            background: white;
            padding: 20px;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            page-break-after: always;
        }
        
        .bulletin-header {
            text-align: center;
            margin-bottom: 30px;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 15px;
        }
        
        .bulletin-header h1 {
            color: white;
            margin: 5px 0;
            font-size: 1.8em;
        }
        
        .bulletin-header h2 {
            color: #ffd700;
            margin: 5px 0;
            font-size: 1.4em;
        }
        
        .bulletin-header p {
            margin: 5px 0;
            font-size: 1.1em;
        }
        
        .logo-ecole {
            max-height: 80px;
            max-width: 200px;
            object-fit: contain;
            background: white;
            padding: 5px;
            border-radius: 10px;
            margin-bottom: 10px;
        }
        
        .devise {
            font-style: italic;
            color: #ffd700;
            font-weight: bold;
        }
        
        .eleve-photo {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid white;
            background: white;
        }
        
        .eleve-info {
            flex: 1;
        }
        
        .eleve-info h2 {
            color: white;
            margin-bottom: 10px;
        }
        
        .eleve-info p {
            margin: 5px 0;
            font-size: 1.1em;
        }
        
        .bulletin-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            font-size: 0.9em;
        }
        
        .bulletin-table th {
            background: #667eea;
            color: white;
            padding: 8px;
            text-align: center;
            font-size: 0.85em;
        }
        
        .bulletin-table td, .bulletin-table th {
            border: 1px solid #ddd;
            padding: 6px;
            text-align: center;
        }
        
        .bulletin-table tr:nth-child(even) {
            background: #f8f9fa;
        }
        
        .stats-classe {
            margin: 20px 0;
            padding: 15px;
            background: #e8f4fd;
            border-radius: 10px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }
        
        .stat-item {
            text-align: center;
        }
        
        .stat-item strong {
            display: block;
            color: #667eea;
            font-size: 1.2em;
        }
        
        .bulletin-footer {
            margin-top: 30px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 10px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
        }
        
        .mention {
            font-size: 1.2em;
            font-weight: bold;
            color: #28a745;
        }
        
        .prof-signature {
            margin-top: 20px;
            display: flex;
            justify-content: flex-end;
            align-items: flex-end;
            padding: 0 20px;
            gap: 20px;
            flex-wrap: wrap;
        }
        
        .signature-line {
            min-width: 180px;
            text-align: center;
            padding: 6px 8px;
        }
        .signature-bloc-titre {
            font-weight: 700;
            font-size: 0.95em;
            color: #222;
            margin-bottom: 6px;
            text-decoration: underline;
            text-underline-offset: 2px;
        }
        .signature-bloc-nom {
            font-size: 0.85em;
            color: #444;
            margin-top: 6px;
            margin-bottom: 0;
        }
        .signature-espace-signer {
            height: 55px;
            border-bottom: 2px solid #333;
            margin: 0 15px 4px;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            padding-bottom: 4px;
            position: relative;
            overflow: visible;
        }
        .signature-espace-chef {
            min-height: 120px;
            height: 120px;
            border-bottom: none;
            padding-bottom: 0;
            align-items: center;
            justify-content: center;
        }
        .signature-chef-doc-right {
            margin-left: auto;
        }
        .img-signature-chef {
            max-width: 220px;
            max-height: 90px;
            object-fit: contain;
            display: block;
            margin: 0 auto;
        }
        .img-cachet-chef {
            position: absolute;
            right: 10px;
            bottom: 0;
            width: 220px;
            max-height: 90px;
            object-fit: contain;
            opacity: 0.98;
        }
        .ligne-signature-vide {
            width: 210px;
            border-bottom: 2px solid #333;
            height: 40px;
            margin: 0 auto 10px;
        }
        .signature-chef-ligne {
            min-width: 280px;
        }
        
        /* Styles pour les cartes scolaires */
        .cartes-grid {
            display: grid;
            grid-template-columns: repeat(2, max-content);
            gap: 12px;
            padding: 15px;
            justify-content: center;
        }
        
        .carte-scolaire {
            background: white;
            width: 10cm;
            height: 7cm;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 8px 20px rgba(0,0,0,0.2);
            transition: transform 0.3s;
            border: 2px solid #1a237e;
            display: flex;
            flex-direction: column;
            font-size: 0.82em;
        }
        
        .carte-scolaire:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(26,35,126,0.4);
        }
        
        .carte-header {
            background: #1a237e;
            color: white;
            padding: 5px 10px;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }
        
        .carte-header h3 {
            color: white;
            margin: 0;
            font-size: 1em;
        }
        
        .carte-header p {
            color: #ffd700;
            margin: 1px 0 0;
            font-weight: bold;
            font-size: 0.85em;
        }

        /* CORPS : infos à gauche + photo à droite en flex row */
        .carte-body {
            display: flex;
            flex-direction: row;
            flex: 1;
            overflow: hidden;
        }

        .carte-photo-container {
            width: 130px;
            min-width: 130px;
            background: #e8eaf6;
            border-left: 2px solid #1a237e;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }
        
        .carte-photo {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        
        .carte-info {
            padding: 5px 7px;
            background: white;
            flex: 1;
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
        }

        /* Filigrane armoiries dans la zone info - centré oblique */
        .carte-filigrane {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 75%;
            height: 75%;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            z-index: 0;
            opacity: 0.09;
        }
        .carte-filigrane img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
        
        .carte-info p {
            margin: 2px 0;
            padding: 2px 3px;
            border-bottom: 1px solid #ddd;
            display: flex;
            align-items: center;
            gap: 4px;
            line-height: 1.35;
            position: relative;
            z-index: 1;
        }
        
        .carte-info i {
            color: #1a237e;
            width: 13px;
            font-size: 0.85em;
            flex-shrink: 0;
        }
        
        .carte-info strong {
            color: #111;
            min-width: 60px;
            font-size: 0.87em;
        }
        
        .carte-info span {
            color: #111;
            flex: 1;
            font-size: 0.87em;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: normal;
            word-break: break-word;
            font-weight: 700;
            line-height: 1.2;
        }
        
        .carte-footer {
            background: #e8eaf6;
            padding: 3px 10px;
            border-top: 2px solid #1a237e;
            flex-shrink: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }
        
        .carte-footer p {
            margin: 1px 0;
            color: #111;
            font-weight: 600;
            font-size: 0.8em;
        }
        
        .carte-footer .devise {
            color: #1a237e;
            font-size: 0.75em;
            font-style: italic;
        }
        
        /* Styles pour la lettre aux parents */
        .lettre-container {
            max-width: 800px;
            margin: 0 auto;
            background: white;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            page-break-after: always;
        }
        
        .lettre-header {
            text-align: center;
            margin-bottom: 30px;
            border-bottom: 2px solid #667eea;
            padding-bottom: 20px;
        }
        
        .lettre-date {
            text-align: right;
            margin-bottom: 30px;
        }
        
        .lettre-corps {
            line-height: 1.8;
            margin-bottom: 30px;
        }
        
        .lettre-signature {
            margin-top: 50px;
            text-align: right;
        }
        
        /* Styles pour la configuration de l'école */
        .ecole-config {
            background: white;
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 30px;
            border: 2px solid #667eea;
        }
        
        .ecole-config h3 {
            color: #667eea;
            margin-bottom: 20px;
            border-bottom: 2px solid #667eea;
            padding-bottom: 10px;
        }
        
        .ecole-config .form-row {
            background: none;
            padding: 10px 0;
        }
        
        /* ══════════════════════════════════════════════════
           RESPONSIVE — INTERFACE MOBILE & TABLETTE
           ══════════════════════════════════════════════════ */

        /* ── Bouton hamburger menu mobile ── */
        #nav-hamburger {
            display: none;
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            font-size: 1.3em;
            padding: 6px 12px;
            border-radius: 10px;
            cursor: pointer;
            flex-shrink: 0;
        }
        /* ── Overlay nav mobile ── */
        #nav-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            z-index: 998;
        }
        #nav-overlay.open { display: block; }

        /* ── Tablette (≤ 1024px) ── */
        @media (max-width: 1024px) {
            nav { width: 135px; }
            nav button { font-size: 0.74em; padding: 6px 8px; }
            .page-container { padding: 12px 14px; }
            .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
            .stat-value { font-size: 2em; }
            .grid-2 { grid-template-columns: 1fr; }
            .form-row { flex-direction: column; gap: 10px; }
            .form-row > div { flex: 1 1 100% !important; min-width: unset !important; }
            .toolbar { padding: 8px 12px; gap: 6px; }
            .toolbar button, .toolbar select, .toolbar input { font-size: 0.85em; }
            .modal-content { max-width: 96% !important; padding: 18px 16px; }
            header { padding: 0.5rem 1rem; gap: 10px; }
            .expiration-badge { font-size: 0.75rem; padding: 3px 8px; }
        }

        /* ── Mobile (≤ 768px) ── */
        @media (max-width: 768px) {
            #nav-hamburger { display: flex; align-items: center; justify-content: center; }

            nav {
                position: fixed;
                top: 0; left: -175px;
                height: 100%;
                width: 170px;
                z-index: 999;
                background: linear-gradient(180deg, #3a3a6a 0%, #2d2d5c 100%);
                transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
                padding-top: 60px;
                border-right: none;
                box-shadow: 4px 0 20px rgba(0,0,0,0.4);
            }
            nav.open { left: 0; }
            nav button { font-size: 0.82em; padding: 9px 12px; border-radius: 12px; }
            nav button i { width: 18px; }

            .app-body { flex-direction: column; }
            .page-container { padding: 10px; }

            header { padding: 0.4rem 0.8rem; gap: 8px; }
            header h1 { font-size: 1em; }
            .logo-container { padding: 3px 8px; }
            #logoPreview { max-height: 34px; max-width: 90px; }
            .logo-btn { display: none; }
            .expiration-badge { font-size: 0.7rem; padding: 2px 6px; white-space: nowrap; }
            #userInfoConnecte { display: none !important; }

            /* Cards & sections */
            .section-card { border-radius: 16px; padding: 14px; }
            h2 { font-size: 1.2em; }
            .stat-card { padding: 16px; border-radius: 14px; }
            .stat-value { font-size: 1.7em; }
            .stat-icon { width: 44px; height: 44px; }
            .stat-icon i { font-size: 20px; }
            .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

            /* Toolbar mobile: scroll horizontal */
            .toolbar {
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                padding: 8px 10px;
                gap: 6px;
                border-radius: 16px;
                scrollbar-width: none;
            }
            .toolbar::-webkit-scrollbar { display: none; }
            .toolbar button, .toolbar .btn { white-space: nowrap; flex-shrink: 0; font-size: 0.8em; padding: 6px 12px; }
            .toolbar select, .toolbar input { flex-shrink: 0; min-width: 120px; font-size: 0.82em; }

            /* Tables: scroll horizontal */
            table { font-size: 0.82em; }
            .page-container table, .section-card table {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                white-space: nowrap;
            }
            th, td { padding: 7px 8px; }

            /* Forms */
            .form-row { flex-direction: column; gap: 8px; border-radius: 16px; }
            .form-row > div { flex: 1 1 100% !important; min-width: unset !important; }
            input, select, textarea { font-size: 16px; /* évite zoom iOS */ border-radius: 20px; }
            .grid-2 { grid-template-columns: 1fr; gap: 10px; }

            /* Modals */
            .modal-content {
                max-width: 98% !important;
                width: 98% !important;
                padding: 16px 12px !important;
                border-radius: 18px !important;
                max-height: 92vh;
            }
            .modal-header h3 { font-size: 1em; }

            /* Bulletins & Synoptique */
            .bulletin-container { padding: 12px; border-radius: 12px; }
            .bulletin-header { padding: 12px; }
            .bulletin-header h1 { font-size: 1.2em; }
            .bulletin-header h2 { font-size: 1em; }

            /* Cartes scolaires: 1 par ligne sur mobile */
            .cartes-grid { grid-template-columns: 1fr; justify-content: center; }

            /* Module tabs */
            #comm-panel-circulaires .toolbar,
            #med-panel-dossiers .toolbar,
            #cant-panel-inscriptions .toolbar,
            #trans-panel-routes .toolbar { border-radius: 16px; }
        }

        /* ── Très petit mobile (≤ 480px) ── */
        @media (max-width: 480px) {
            .dashboard-grid { grid-template-columns: 1fr; }
            header h1 span:last-child { display: none; }
            .stat-label { font-size: 0.8em; letter-spacing: 0; }
            .btn { padding: 6px 12px; font-size: 0.82em; }
            h2 { font-size: 1.1em; }
            .section-card { padding: 10px; }
            /* Cacher les labels texte nav sur mobile — garder seulement les icones */
            nav .nav-label { display: none; }
            nav button { padding: 10px; min-width: 44px; justify-content: center; }
            nav button i { width: auto; margin: 0; }
            /* Sélecteur écoles responsive */
            #etablissementSelector > div { padding: 20px 12px; }
            #etablissementSelector h1 { font-size: 1.4em; }
        }

        /* ── Styles communs responsive bouttons onglets modules ── */
        .module-tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
        .module-tabs .btn { font-size:0.82em; padding:6px 12px; border-radius:20px; }
        @media (max-width: 600px) {
            .module-tabs { overflow-x:auto; flex-wrap:nowrap; padding-bottom:4px; }
            .module-tabs .btn { flex-shrink:0; font-size:0.78em; padding:5px 10px; }
        }

        /* Barre de défilement horizontale pour les tableaux larges */
        .tw, .table-wrapper, div[style*="overflow-x:auto"] {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: #667eea #f0f4ff;
        }
        .tw::-webkit-scrollbar, .table-wrapper::-webkit-scrollbar {
            height: 6px;
        }
        .tw::-webkit-scrollbar-track {
            background: #f0f4ff;
            border-radius: 3px;
        }
        .tw::-webkit-scrollbar-thumb {
            background: #667eea;
            border-radius: 3px;
        }
        /* Tables toujours en largeur minimum */
        .tw table, .table-wrapper table {
            min-width: 600px;
        }
        /* Page container scroll horizontal sur mobile */
        @media (max-width: 768px) {
            .page-container {
                overflow-x: hidden;
            }
            table {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
        }

        /* Styles pour l'impression */
        @media print {
            .no-print, .toolbar, nav, header, .btn, .delete-btn, .bulk-delete-btn, 
            .checkbox-column, .select-all-header, .filter-container, .import-area, 
            .modal, .expired-overlay, .warning-message, .ecole-config {
                display: none !important;
            }
            body { background: white; overflow: visible; height: auto; margin: 0; }
            #_print_footer_global { display: block !important; position: fixed; bottom: 6mm; left: 10mm; right: 10mm; background:white; }
            .app-body { display: block; height: auto; overflow: visible; }
            .page-container { overflow: visible; padding: 0; width: 100%; }
            table { box-shadow: none; }
            th { background: #ccc; color: black; }
            /* Forcer une seule page sauf si contenu long */
            @page { margin: 10mm; size: A4; }
            .section-card { box-shadow: none !important; border: none !important; }
            /* Bulletins : une page par bulletin */
            
            /* ── Bulletin : UNE PAGE PAR BULLETIN ── */
            .bulletin-container {
                box-shadow: none;
                padding: 4mm 6mm !important;
                page-break-after: always !important;
                break-after: page !important;
                page-break-inside: avoid !important;
                break-inside: avoid !important;
                max-width: 100% !important;
                width: 100% !important;
                margin: 0 !important;
                border-radius: 0 !important;
                font-size: 0.88em !important;
            }
            .bulletin-container:last-child {
                page-break-after: auto !important;
                break-after: auto !important;
            }
            .bulletin-header {
                padding: 6px 10px !important;
                margin-bottom: 6px !important;
                border-radius: 6px !important;
            }
            .bulletin-header h1 { font-size: 1em !important; margin: 2px 0 !important; }
            .bulletin-header h2 { font-size: 0.9em !important; margin: 2px 0 !important; }
            .bulletin-header p  { font-size: 0.82em !important; margin: 2px 0 !important; }
            .bulletin-table { margin: 4px 0 !important; }
            .bulletin-table th, .bulletin-table td { padding: 3px 4px !important; font-size: 0.78em !important; }
            .bulletin-footer { margin-top: 6px !important; padding: 6px !important; gap: 8px !important; }
            .stats-classe { margin: 4px 0 !important; padding: 6px !important; gap: 6px !important; }
            .prof-signature { margin-top: 6px !important; padding: 0 4px !important; }
            .eleve-photo { width: 60px !important; height: 60px !important; }
            .logo-ecole { max-height: 40px !important; }
            
            /* Synoptique */
            .synoptique-container {
                box-shadow: none;
                padding: 0;
                page-break-after: always;
            }
            
            /* Cartes scolaires */
            .carte-scolaire {
                box-shadow: none;
                border: 2px solid #1a237e;
                page-break-inside: avoid;
                break-inside: avoid;
            }
            .carte-header {
                background: #1a237e !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
            .carte-footer, .carte-photo-container {
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
            .lettre-container {
                box-shadow: none;
                border: 1px solid #ddd;
            }
            .cartes-grid {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
            }
            .carte-scolaire {
                margin-bottom: 8px;
                width: 10cm;
                height: 7cm;
            }
        }
#loginOverlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99999;
  background:linear-gradient(135deg,#0f0c29,#302b63,#24243e);
  display:none;align-items:center;justify-content:center;overflow-y:auto;padding:20px;}
.ls{width:100%;max-width:860px;display:grid;grid-template-columns:1fr 1fr;gap:0;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);
  border-radius:28px;overflow:hidden;box-shadow:0 40px 80px rgba(0,0,0,.6);}
@media(max-width:700px){
    .ls{grid-template-columns:1fr; border-radius:16px; margin:8px; width:calc(100% - 16px);}
    .ls-left{display:none;}
    .ls-right{padding:28px 20px;}
    .lf-ttl{font-size:20px;}
    .lt{padding:11px 14px; font-size:13px;}
    .lfi input,.lfi select,.lfi textarea{font-size:16px; padding:13px 14px;}
    .lf-btn{padding:15px; font-size:16px; border-radius:14px;}
    .lf2{grid-template-columns:1fr;}
    #loginOverlay{padding:8px; align-items:flex-start; padding-top:20px;}
}
@media(max-width:400px){
    .ls-right{padding:22px 14px;}
    #loginOverlay{padding:6px; padding-top:12px;}
    .lf-ttl{font-size:18px;}
    .lfi input,.lfi select{font-size:16px; padding:12px 12px;}
}
.ls-left{background:linear-gradient(160deg,#667eea,#764ba2);padding:40px 32px;
  display:flex;flex-direction:column;justify-content:center;}
.ls-left h2{font-size:28px;font-weight:800;color:#fff;margin-bottom:8px;}
.ls-left p{font-size:13px;color:rgba(255,255,255,.7);margin-bottom:32px;line-height:1.6;}
.lt{width:100%;padding:13px 18px;border:none;border-radius:14px;cursor:pointer;
  font-size:14px;font-weight:600;font-family:inherit;text-align:left;
  display:flex;align-items:center;gap:10px;margin-bottom:10px;transition:all .2s;}
.lt.on{background:rgba(255,255,255,.22);color:#fff;box-shadow:0 4px 16px rgba(0,0,0,.25);}
.lt.off{background:rgba(255,255,255,.06);color:rgba(255,255,255,.55);}
.lt:hover{background:rgba(255,255,255,.18);color:#fff;}
.ls-right{padding:36px;}
.lf{display:none;}.lf.on{display:block;}
.lf-ttl{font-size:20px;font-weight:700;color:#fff;margin-bottom:4px;}
.lf-sub{font-size:12px;color:rgba(255,255,255,.45);margin-bottom:24px;}
.lfi{margin-bottom:14px;}
.lfi label{display:block;font-size:12px;font-weight:700;color:rgba(255,255,255,.75);
  letter-spacing:.5px;margin-bottom:6px;}
.lfi input,.lfi select,.lfi textarea{
  width:100%;padding:12px 16px;background:rgba(255,255,255,.1);
  border:1.5px solid rgba(255,255,255,.2);border-radius:12px;color:#fff;
  font-size:14px;font-family:inherit;outline:none;transition:border-color .2s;box-sizing:border-box;
  white-space:normal;overflow:visible;}
.lfi input::placeholder,.lfi textarea::placeholder{color:rgba(255,255,255,.35);}
.lfi input:focus,.lfi select:focus,.lfi textarea:focus{border-color:#a5b4fc;background:rgba(102,126,234,.15);box-shadow:0 0 0 3px rgba(102,126,234,.2);}
.lfi select option{background:#302b63;color:#fff;}
.lfi select{cursor:pointer;}
.lfi textarea{min-height:80px;resize:vertical;}
.lfi small{display:block;font-size:11px;color:rgba(255,255,255,.45);margin-top:4px;line-height:1.4;}
.lf2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.lfi label small{font-size:10.5px;color:rgba(255,255,255,.4);font-weight:400;letter-spacing:0;display:inline;}
@media(max-width:500px){.lf2{grid-template-columns:1fr;}}
.lf-btn{width:100%;padding:13px;border:none;border-radius:12px;cursor:pointer;font-family:inherit;
  font-size:14px;font-weight:700;margin-top:4px;transition:all .2s;}
.lf-blue{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 4px 16px rgba(102,126,234,.4);}
.lf-blue:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(102,126,234,.5);}
.lf-green{background:linear-gradient(135deg,#43A047,#2E7D32);color:#fff;box-shadow:0 4px 16px rgba(67,160,71,.35);}
.lf-green:hover{transform:translateY(-1px);}
.lf-msg{padding:10px 14px;border-radius:10px;font-size:13px;margin-bottom:14px;display:none;}
.lf-err{background:rgba(239,68,68,.14);border:1px solid rgba(239,68,68,.3);color:#fca5a5;}
.lf-ok{background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.25);color:#86efac;}
.lf-info{background:rgba(59,130,246,.1);border:1px solid rgba(59,130,246,.25);color:#93c5fd;}
.lf-hr{height:1px;background:rgba(255,255,255,.08);margin:16px 0;}
.lf-foot{text-align:center;margin-top:16px;padding-top:14px;border-top:1px solid rgba(255,255,255,.06);}
.lf-foot span{font-size:11px;color:rgba(255,255,255,.25);}
.lf-link{background:none;border:none;color:#a5b4fc;cursor:pointer;font-size:12px;font-weight:600;padding:0 4px;font-family:inherit;}
.lf-steps{display:flex;flex-direction:column;gap:8px;margin-bottom:18px;}
.lf-step{display:flex;align-items:flex-start;gap:10px;font-size:12px;color:rgba(255,255,255,.5);}
.lf-step-n{width:22px;height:22px;border-radius:50%;background:rgba(102,126,234,.3);color:#a5b4fc;
  font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px;}
