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

/* body{
    font-family: 'Segoe UI', sans-serif;
    background: #f4f7fb;
    color: #333;
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
} */

body {
    font-family: 'Segoe UI', sans-serif;
    /* Un fond très légèrement bleuté et lumineux (dégradé doux) */
    background: linear-gradient(135deg, #a1f4f8 0%, #d9e2ec 100%);
    color: #333;
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img{
    -webkit-user-drag: none;
    user-drag: none;
}

/* ===== TITRE ===== */
h1{
    text-align: center;
    margin: 30px 0;
    color: #1a73e8;
    font-size: 2.5rem;
}

.section-title{
    text-align: center;
    color: #1a73e8;
    margin-bottom: 10px;
}

/* ===== RUBAN / ONGLET ===== */
.ribbon-container{
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.ribbon{
    display: flex;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tab-button{
    border: none;
    background: #e9eefb;
    color: #1a73e8;
    padding: 12px 20px;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.3s;
}

.tab-button:hover{
    background: #1a73e8;
    color: white;
    transform: translateY(-2px);
}

.tab-button.active{
    background: #1a73e8;
    color: white;
}

/* ===== CONTENU ONGLET ===== */
.tab-content{
    width: 90%;
    max-width: 1200px;
    margin: auto;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn{
    from{
        opacity: 0;
        transform: translateY(10px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CARTE BIENVENUE ===== */
.welcome-card{
    background: white;
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.welcome-card h3{
    margin: 15px 0;
    color: #1a73e8;
    font-size: 2rem;
}

.welcome-card p{
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.instructions-list{
    list-style: none;
}

.instructions-list li{
    margin: 10px 0;
    background: #f4f7fb;
    padding: 12px;
    border-radius: 12px;
}

/* ===== STATISTIQUES (compte admin) ===== */
.visitor-stats{
    margin-top: 30px;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 15px;
    text-align: center;
}

.visitor-stats h4{
    color: #1a73e8;
    margin-bottom: 15px;
}

.visitor-number{
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.visitor-label{
    margin-top: 10px;
    color: #666;
}

.visitor-last{
    margin-top: 15px;
    font-size: 0.9rem;
    color: #888;
}

/* ===== DOSSIERS MODERNES ===== */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 28px;
    padding: 20px 10px;
    justify-content: center;
    margin: 20px 0;
}

.folder.modern {
    background: none;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: inherit;
}

.folder.modern:hover {
    transform: translateY(-6px);
}

.folder-icon {
    width: 110px;
    height: 90px;
    margin: 0 auto 12px;
    position: relative;
}

.folder-tab {
    width: 45%;
    height: 14px;
    border-radius: 8px 8px 0 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.folder-body {
    width: 100%;
    height: 76px;
    border-radius: 0 12px 12px 12px;
    position: absolute;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transition: all 0.25s ease;
}

.folder.modern:hover .folder-body {
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.folder-body .icon {
    font-size: 32px;
}

/* Couleurs des dossiers */
.folder-icon.devoir .folder-tab,
.folder-icon.devoir .folder-body {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.folder-icon.bac-blanc .folder-tab,
.folder-icon.bac-blanc .folder-body {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.folder-icon.bac .folder-tab,
.folder-icon.bac .folder-body {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

.folder-icon.series .folder-tab,
.folder-icon.series .folder-body {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.folder-icon.olympiad .folder-tab,
.folder-icon.olympiad .folder-body {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.folder-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* ===== BOUTON RETOUR ===== */
.back-btn{
    background: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: 0.3s;
}

.back-btn:hover{
    background: #1558b0;
    transform: translateY(-2px);
}

/* ===== MODALE IMAGE ===== */
.modele{
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modele-contenu{
    max-width: 90%;
    max-height: 85%;
    border-radius: 15px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn{
    from{
        transform: scale(0.8);
        opacity: 0;
    }
    to{
        transform: scale(1);
        opacity: 1;
    }
}

.fermer{
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 45px;
    cursor: pointer;
    transition: 0.3s;
}

.fermer:hover{
    color: #1a73e8;
}

.nav-droite,
.nav-gauche{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    user-select: none;
    padding: 15px;
    transition: 0.3s;
}

.nav-droite:hover,
.nav-gauche:hover{
    color: #1a73e8;
}

.nav-droite{
    right: 20px;
}

.nav-gauche{
    left: 20px;
}

/* ===== ÉCRAN DE CONNEXION ===== */
.login-container{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #16a34a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-family: 'Segoe UI', sans-serif;
}

.login-box{
    background: rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    width: 80%;
    max-width: 400px;
}

.login-icon{
    font-size: 50px;
    margin-bottom: 10px;
}

.login-icon img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.login-icon h2 {
    margin: 0;
    font-size: 24px;
}

.login-box h2{
    margin-bottom: 5px;
}

.login-subtitle{
    margin-bottom: 25px;
    opacity: 0.9;
}

.login-container input{
    width: 100%;
    padding: 12px;
    border-radius: 15px;
    border: none;
    text-align: center;
    font-size: 1rem;
    outline: none;
    margin-bottom: 15px;
    transition: 0.3s;
    -webkit-user-select: text;
    user-select: text;
}

.login-container input:focus{
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.login-container button{
    width: 100%;
    padding: 12px;
    border-radius: 15px;
    border: none;
    background: white;
    color: #16a34a;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    margin-top: 5px;
}

.login-container button:hover{
    background: #dcf5e5;
    transform: translateY(-2px);
}

.erreur-code{
    color: #ffcccb;
    margin-top: 15px;
    display: none;
    font-size: 0.9rem;
}

.error-message{
    display: none;
    color: #ffb3b3;
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
    padding: 0 20px;
}

/* ===== BOUTON WHATSAPP / CONTACT ===== */
.contact-login {
    margin-top: 25px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

.whatsapp-btn,
.whatsapp-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover,
.whatsapp-btn-login:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
}

/* ===== AVERTISSEMENT ===== */
.screenshot-warning{
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: #ff4444;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10000;
    font-family: monospace;
    display: none;
    pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
    h1{
        font-size: 2rem;
    }

    .ribbon{
        flex-direction: column;
        width: 90%;
    }

    .tab-button{
        justify-content: center;
        width: 100%;
    }

    .welcome-card{
        padding: 25px;
    }

    .nav-droite,
    .nav-gauche{
        font-size: 35px;
    }

    .folder-icon{
        width: 90px;
        height: 75px;
    }
}


/* ===== LISTE DES FICHIERS DANS UN DOSSIER ===== */
.docs-grid {
    display: grid;
    gap: 12px;
    margin-top: 15px;
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.doc-empty {
    padding: 20px;
    text-align: center;
    color: #888;
    font-style: italic;
}

.doc-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f4f7fb;
    border-radius: 12px;
    flex-wrap: wrap;
    transition: 0.2s;
}

.doc-file:hover {
    background: #e9eefb;
}

.doc-icon {
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
}

.doc-icon.pdf { background: #e53935; }
.doc-icon.docx { background: #1a73e8; }

.doc-file-name {
    flex: 1;
    min-width: 150px;
    font-weight: 600;
    color: #1e293b;
}

.doc-actions {
    display: flex;
    gap: 8px;
}

.doc-btn {
    text-decoration: none;
    background: #e9eefb;
    color: #1a73e8;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

.doc-btn:hover {
    background: #1a73e8;
    color: white;
}

.doc-btn-dl {
    background: #1a73e8;
    color: white;
}

.doc-btn-dl:hover {
    background: #1558b0;
}

/* Style de la barre de recherche */
#inputRechercheFichier {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #e1e4e8;
    background-color: #f8f9fa;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Effet quand l'élève clique pour chercher */
#inputRechercheFichier:focus {
    border-color: #0066cc; /* Un beau bleu assorti à ton thème */
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
}

/* Style du texte "placeholder" (Rechercher un document...) */
#inputRechercheFichier::placeholder {
    color: #888;
    font-style: italic;
}


/* ===== STYLE DU TABLEAU DE RÉSULTATS ===== */
.resultats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.resultats-table th {
    background: #1a73e8;
    color: white;
    padding: 14px;
    text-align: right; /* Pour l'arabe */
    font-weight: 600;
}

.resultats-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: right; /* Pour l'arabe */
    color: #334155;
}

.resultats-table tr:last-child td {
    border-bottom: none;
}

.resultats-table tr:hover {
    background: #f8fafc;
}

/* ===== تنسيق بطاقة الإيصال الجديدة ===== */
.welcome-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 30px;
}

/* تنسيق النصوص داخل الإيصال */
#recuNom, #recuNote, #recuProf, #recuDate {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}