/* ============================================================
   Plateforme d'inscription Master — Design System Moderne
   Style: Moderne, Étudiant, Dégradés et Ombres douces
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Couleurs de fond modernes */
    --bg-body: #F3F4F6;
    --bg-surface: #FFFFFF;
    
    /* Textes */
    --text-main: #1F2937;
    --text-muted: #6B7280;
    
    /* Dégradés principaux (Identité institutionnelle modernisée) */
    --gradient-primary: linear-gradient(135deg, #0D9488 0%, #047857 100%); /* Teal vers Émeraude */
    --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); /* Ambre vers Doré */
    --gradient-danger: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    
    /* Couleurs unies pour états */
    --gold-light: #FEF3C7;
    --green-light: #D1FAE5;
    --danger-light: #FEE2E2;
    --info-light: #E0F2FE;
    --info-text: #0369A1;
    
    /* Formes et Ombres */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px rgba(4, 120, 87, 0.08);
    --shadow-hover: 0 15px 30px rgba(4, 120, 87, 0.15);
    
    /* Typographie */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
}


.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

a { color: #0D9488; text-decoration: none; transition: all 0.3s ease; }
a:hover { color: #047857; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    margin: 0 0 .5em;
    letter-spacing: -0.02em;
}
h1 { font-size: 2.2rem; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

/* ---------- Header ---------- */
.site-header {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 15px;
}
.brand {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFFFFF !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand:hover { transform: scale(1.02); }
.annee-badge {
    font-family: var(--font-body);
    font-size: .75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}
.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a {
    color: rgba(255, 255, 255, 0.9);
    font-size: .95rem;
    font-weight: 500;
}
.main-nav a:hover { color: #FFFFFF; transform: translateY(-1px); }
.btn-nav-cta {
    background: var(--gradient-gold);
    color: #FFFFFF !important;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}
.btn-nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4); }

/* ---------- Main & Footer ---------- */
.main-content {
    padding: 48px 24px 80px;
    min-height: 70vh;
}
.site-footer {
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: .9rem;
}

/* ---------- Cards / Panels ---------- */
.panel {
    background: var(--bg-surface);
    border: none;
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.panel:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.panel + .panel { margin-top: 32px; }
.panel-narrow { max-width: 520px; margin: 0 auto; }
.panel-eyebrow {
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #0D9488;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}
.panel-subtitle { color: var(--text-muted); margin-bottom: 2em; }

/* ---------- Forms ---------- */
form .field { margin-bottom: 24px; }
label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}
label .req { color: #EF4444; }
.field-hint { font-size: .8rem; color: var(--text-muted); margin-top: 6px; }

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-sm);
    background: #F9FAFB;
    color: var(--text-main);
    transition: all 0.3s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #0D9488;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.input-group-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .input-group-2 { grid-template-columns: 1fr; } }

fieldset {
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-sm);
    padding: 24px;
    margin: 0 0 24px;
    background: #FFFFFF;
}
legend {
    font-family: var(--font-heading);
    font-weight: 600;
    color: #0D9488;
    padding: 0 12px;
    background: #FFFFFF;
    border-radius: var(--radius-full);
}

/* ---------- Buttons (Avec effets de dégradé) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-primary {
    background: var(--gradient-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(4, 120, 87, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(4, 120, 87, 0.3); color: #FFF;}
.btn-secondary {
    background: #FFFFFF;
    color: #0D9488;
    border: 2px solid #0D9488;
}
.btn-secondary:hover { background: #F0FDFA; transform: translateY(-2px); }
.btn-gold {
    background: var(--gradient-gold);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3); color: #FFF; }
.btn-danger { background: var(--gradient-danger); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3); }
.btn-block { display: flex; width: 100%; }

/* ---------- Alerts ---------- */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.alert-success { background: var(--green-light); color: #065F46; border-left: 4px solid #10B981; }
.alert-error { background: var(--danger-light); color: #991B1B; border-left: 4px solid #EF4444; }
.alert-info { background: var(--info-light); color: var(--info-text); border-left: 4px solid #0EA5E9; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #FFFFFF; }
th, td { padding: 14px 16px; border-bottom: 1px solid #E5E7EB; text-align: left; }
th {
    font-family: var(--font-heading);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    background: #F9FAFB;
}
tr:hover td { background: #F3F4F6; }

/* ---------- Badges (Pillules modernes) ---------- */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-80, .badge-info { background: var(--info-light); color: var(--info-text); }
.badge-20, .badge-attente { background: var(--gold-light); color: #92400E; }
.badge-validee { background: var(--green-light); color: #065F46; }
.badge-rejetee { background: var(--danger-light); color: #991B1B; }

/* ---------- Wizard / steps ---------- */
.steps {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    list-style: none;
    padding: 0;
}
.steps li {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: #F3F4F6;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    font-size: .85rem;
    transition: all 0.3s ease;
}
.steps li.active {
    background: var(--gradient-primary);
    color: #FFFFFF;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.steps li.done {
    background: var(--green-light);
    color: #047857;
}

/* ---------- Dashboard Grid & Stats ---------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
/* Effet de barre colorée en haut de la carte stat */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--gradient-gold);
}
.stat-card .stat-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    margin-bottom: 4px;
}
.stat-card .stat-label {
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 700px) {
    .panel { padding: 24px; }
    h1 { font-size: 1.8rem; }
    .steps { flex-direction: column; gap: 8px; }
}

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 16px; }
.mt-2 { margin-top: 32px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.divider { border: none; height: 1px; background: #E5E7EB; margin: 32px 0; }
.filiere-ar, .arabic-text { direction: rtl; font-family: 'Amiri', "Noto Naskh Arabic", sans-serif; font-size: 1.1em; }