body{
    padding: 0;
    margin: 0;
}

.entete{
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 255, 0.836);
}

/* MENU PRINCIPAL */
.menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ge{
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu li {
    position: relative;
}

.menu a {
    text-decoration: none;
    color: white;
    padding: 8px 10px;
}

/* SOUS MENU */
.submenu {
    display: none;
    position: absolute;
    top: 100%; /* collé juste en dessous */
    left: 0;
    background: white;
    list-style: none;
    padding: 5px 0;
    border-radius: 5px;
    min-width: 150px;
}

/* CHAQUE LIEN */
.submenu li a {
    color: black;
    display: block;
    padding: 10px;
}

/* AFFICHAGE UNIQUEMENT SUR LE BON MENU */
.menu li.dropdown:hover > .submenu {
    display: block;
}
/* Liens : couleur de la marque (les menus sombres définissent leur propre couleur) */
a{
    color: #0f766e;
    text-decoration: none;
}

a:hover {
    color: #115e59;
}

.img{
    width: 60px;
    margin-left: 10px;
}
   
   /* PATIE DES 4 CARDS */
.dashboard {
    display: flex;
    gap: 15px;
    margin:30px 30px 0px 30px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-end;
}

.card {
    flex: 1;
    min-width: 200px;
    background: #4CAF50;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover{
     transition: all 0.3s ease;
     transform: translate(-10px);
     box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.card:nth-child(2) {
    background: #2196F3;
}

.card:nth-child(3) {
    background: #FF9800;
}

.card:nth-child(4) {
    background: #E91E63;
}

.form-container {
    width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: #f4f4f4;
    border-radius: 10px;
    box-shadow: 0px 5px 15px rgba(0,0,0,0.2);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-container input,
.form-container select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
}

.form-container button {
    width: 100%;
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

.form-container button:hover {
    background: #45a049;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn.primary {
    background: #007bff;
    color: white;
}

.btn.secondary {
    background: #6c757d;
    color: white;
}

.btn.edit {
    background: #17a2b8;
    color: white;
}

.btn.delete {
    background: #dc3545;
    color: white;
}

.btn:hover {
    opacity: 0.92;
}

.supmod{
    color: black;
}


h2{
    text-align: center;
    margin-top: 0;
    padding-top: 0;
}



.container {
    display: flex;
    align-items: flex-start;

}

/* Style de la Sidebar */
.sidebar {
    width: 260px;
    height: 50vh;
    background: #2c3e50; 
    padding: 20px 0;
    color: white;
    box-shadow: 3px 0 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    border-radius: 10px;
}

/* Titre "Menu" */
.sidebar h3 {
    text-align: center;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: #3498db;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

/* Style des liens <a> */
.sidebar a {
    padding: 15px 25px;
    text-decoration: none;
    color: #ecf0f1;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 15px;
}

/* Espacement pour les icônes */
.sidebar a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 18px;
}

/* Effet au survol (Hover) */
.sidebar a:hover {
    background: #34495e;
    color: #3498db;
    padding-left: 35px; /* Petit décalage dynamique */
}

/* Ajustement du contenu principal (Dashboard) */
.main-content {
    padding: 20px;
}

.container > .main-content {
    flex: 1;
    min-width: 0;
}

.main {
    flex: 1;
    padding: 20px;
}


.table-container {
    padding: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

th {
    background: #2c3e50;
    color: white;
    padding: 10px;
}

td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.photo {
    width: 70px;
    height: 70px;
    
    object-fit: cover;
}



/* Container du formulaire seulement */
.forms-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px; /* ajustable selon ta page */
}

/* Titre du formulaire */
.forms-container h2 {
    text-align: center;
    color: #0f766e;
    margin-bottom: 20px;
    font-size: 2em;
}

/* Style du formulaire */
.forms-container form {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    width: 350px;
}

/* Inputs du formulaire */
.forms-container form input[type="text"],
.forms-container form input[type="email"],
.forms-container form input[type="password"] {
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1em;
    transition: all 0.3s ease;
}

.forms-container form input[type="text"]:focus,
.forms-container form input[type="email"]:focus,
.forms-container form input[type="password"]:focus {
    border-color: #2575fc;
    box-shadow: 0 0 8px rgba(37, 117, 252, 0.5);
    outline: none;
}

/* Bouton du formulaire */
.forms-container form button[type="submit"] {
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 8px;
    background: #0f766e;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.forms-container form button[type="submit"]:hover {
    background: #115e59;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 400px) {
    .forms-container form {
        width: 90%;
        padding: 20px;
    }
}






/* BARRE DE RECHERCHE ET SON H2  */

table-header {
    display: flex;
    align-items: center; /* Aligne verticalement au milieu */
    justify-content: flex-start; /* Aligne tout vers la gauche */
    gap: 30px; /* Espace entre la recherche et le titre */
    margin-bottom: 20px;
}

.search-container form {
    display: flex;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px 10px;
}

.search-container input {
    border: none;
    outline: none;
    padding: 8px;
    width: 200px;
}

.search-container button {
    background: none;
    border: none;
    cursor: pointer;
    color: #2c3e50;
}



/* SIDEBAR */

/* Modern dashboard layout */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #f4f7ff;
    color: #1f2937;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #0f172a;
    color: #e2e8f0;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.12);
}

.brand-label {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar h1 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.1;
    color: #fff;
}

.sidebar-heading {
    margin: 0;
    padding-top: 16px;
    font-size: 0.75rem;
    color: #94a3b8;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.sidebar-select {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.sidebar-select label {
    color: #cbd5e1;
    font-size: 0.85rem;
}

.sidebar-select select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    background: #0f172a;
    color: #fff;
    outline: none;
    appearance: none;
}

.sidebar-select select option {
    color: #0f172a;
    background: #fff;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #cbd5e1;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(148, 163, 184, 0.14);
    color: #fff;
}

.sidebar-nav.sidebar-classes a {
    padding-left: 24px;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(248, 113, 113, 0.12);
    color: #fee2e2;
    text-decoration: none;
}

.content {
    background: #f4f7ff;
    padding: 24px 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.topbar h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #0f172a;
}

.breadcrumbs {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 0.95rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-search {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.topbar-search input {
    border: none;
    padding: 12px 16px;
    min-width: 220px;
    font-size: 0.95rem;
    outline: none;
    color: #0f172a;
}

.topbar-search button {
    border: none;
    padding: 0 18px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-block {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    padding: 10px 16px;
    border-radius: 18px;
    box-shadow: 0 14px 45px rgba(15, 23, 42, 0.08);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

.user-info span {
    display: block;
    font-weight: 700;
}

.user-info small {
    color: #64748b;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.metric-card {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 128px;
}

.metric-info small {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.metric-value {
    font-size: 2.1rem;
    font-weight: 700;
    color: #0f172a;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    font-size: 1.3rem;
}

.card-classes .metric-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.card-boys .metric-icon { background: rgba(249, 115, 22, 0.15); color: #ea580c; }
.card-girls .metric-icon { background: rgba(219, 39, 119, 0.15); color: #db2777; }

.panel {
    background: #fff;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.05);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #0f172a;
}

.panel-subtitle {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.search-panel-form {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.search-panel-form input {
    border: none;
    padding: 12px 16px;
    min-width: 240px;
    outline: none;
    font-size: 0.95rem;
}

.search-panel-form button {
    border: none;
    background: #2563eb;
    color: #fff;
    padding: 0 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table-container {
    overflow-x: auto;
}

.table-panel table {
    width: 100%;
    border-collapse: collapse;
    min-width: 740px;
}

.table-panel th,
.table-panel td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table-panel thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.95rem;
}

.table-panel tbody tr:hover {
    background: #f8fafc;
}

.table-panel .photo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-panel .btn {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.table-panel .btn.edit {
    background: #2563eb;
}

.table-panel .btn.delete {
    background: #ef4444;
}

.table-panel .btn:hover {
    opacity: 0.92;
}

@media (max-width: 1150px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 10;
        width: 100%;
        border-radius: 0 0 24px 24px;
    }

    .content {
        padding: 20px;
    }
}

@media (max-width: 680px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions {
        justify-content: space-between;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .search-panel-form input {
        min-width: 0;
        width: 100%;
    }

    .table-panel table {
        min-width: 100%;
    }
}

.page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
    color: #0f172a;
}

.page-header .breadcrumbs {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 0.95rem;
}

.page-header .breadcrumbs a {
    color: #0f766e;
    text-decoration: none;
}

.page-header .header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.profile-card,
.panel {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.06);
}

.profile-card-header {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.student-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.student-stats div {
    background: #f8fafc;
    border-radius: 18px;
    padding: 18px 16px;
}

.student-stats span {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.student-stats strong {
    display: block;
    font-size: 1.4rem;
    color: #0f172a;
}

.empty-state {
    color: #475569;
    padding: 20px 0;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.panel-subtitle {
    color: #64748b;
    margin: 8px 0 0;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.class-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-radius: 20px;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.card-presence .metric-icon {
    background: rgba(34, 197, 94, 0.16);
    color: #22c55e;
}

.card-absents .metric-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-present {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.badge-absent {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.text-muted {
    color: #64748b;
}

/* ===== Boutons : une seule palette pour toute l'application ===== */
.btn,
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover,
.btn-back:hover {
    opacity: 1;
    text-decoration: none;
}

.btn.primary {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.btn.primary:hover {
    background: #115e59;
    border-color: #115e59;
    color: #fff;
}

/* Boutons « Retour », « Annuler », filtres… : teinte de la marque */
.btn.secondary,
.btn-back {
    background: #e6f4f1;
    border-color: #a7d7cf;
    color: #0f5f58;
}

.btn.secondary:hover,
.btn-back:hover {
    background: #cdeae4;
    border-color: #7cc4b8;
    color: #0b4a45;
}

.btn.edit {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.btn.edit:hover {
    background: #1d4ed8;
    color: #fff;
}

.btn.delete,
.btn.danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.btn.delete:hover,
.btn.danger:hover {
    background: #b91c1c;
    color: #fff;
}

/* ===== Messages ===== */
.alert {
    display: block;
    padding: 12px 14px;
    margin: 0 0 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    border-left-width: 4px;
}

.alert.success {
    background: #ecfdf3;
    border-color: #86efac;
    border-left-color: #16a34a;
    color: #14532d;
}

.alert.error {
    background: #fef2f2;
    border-color: #fca5a5;
    border-left-color: #dc2626;
    color: #7f1d1d;
}

.panel-clean {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.pagination a,
.pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #a7d7cf;
    background: #fff;
}

.pagination .active,
.pagination span.current {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

/* Barre d'enregistrement qui reste visible en bas de l'écran pendant la saisie */
.save-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e2e8f0;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
}

/* ===== Téléphone ===== */
@media (max-width: 680px) {
    h1 {
        font-size: 1.5rem;
    }

    .container {
        display: block;
    }

    .main-content {
        padding: 12px;
    }

    input,
    select,
    textarea {
        max-width: 100%;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    /* Les grands tableaux défilent horizontalement au lieu de déborder de l'écran */
    table:not(.notes-grid):not(.attendance-table) {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .btn,
    .btn-back {
        padding: 10px 14px;
    }
}

@media (max-width: 980px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-shell {
        padding: 16px;
    }

    .page-header,
    .header-actions,
    .student-stats,
    .topbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        gap: 10px;
    }
}

