﻿
:root {
    --navy: #0f2044;
    --navy-mid: #1a3a6e;
    --navy-light: #2a5298;
    --teal: #1b8f7a;
    --teal-light: #24b89e;
    --accent: #e8a020;
    --white: #ffffff;
    --off-white: #f4f6fb;
    --gray-100: #eef0f6;
    --gray-300: #c4c9d9;
    --gray-500: #7a839e;
    --gray-700: #3d4460;
    --text: #0d1b3e;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --shadow-card: 0 4px 24px rgba(15,32,68,0.10);
    --shadow-hover: 0 12px 40px rgba(15,32,68,0.18);
    --transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--off-white);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

    /* ─── Background pattern ─── */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: radial-gradient(ellipse 800px 600px at 10% 20%, rgba(26,58,110,0.06) 0%, transparent 70%), radial-gradient(ellipse 600px 500px at 90% 80%, rgba(27,143,122,0.05) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
    }

/* ─── Header ─── */
header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15,32,68,0.08);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--navy-mid);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo-icon svg {
        width: 22px;
        height: 22px;
        fill: white;
    }

.logo-text {
    display: flex;
    flex-direction: column;
}

    .logo-text strong {
        font-family: 'Playfair Display', serif;
        font-size: 15px;
        font-weight: 700;
        color: var(--navy);
        letter-spacing: -0.2px;
        line-height: 1.2;
    }

    .logo-text span {
        font-size: 11px;
        color: var(--gray-500);
        letter-spacing: 0.04em;
        font-weight: 400;
    }

.header-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

    .header-pill svg {
        width: 15px;
        height: 15px;
        opacity: 0.6;
    }

.header-badge {
    font-size: 11px;
    background: rgba(27,143,122,0.12);
    color: var(--teal);
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ─── Hero ─── */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 72px 24px 56px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(26,58,110,0.07);
    border: 1px solid rgba(26,58,110,0.14);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy-mid);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

    .hero-eyebrow span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--teal);
        display: inline-block;
    }

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 5vw, 60px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.12;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

    .hero h1 em {
        font-style: italic;
        color: var(--navy-mid);
    }

.hero p {
    font-size: 17px;
    color: var(--gray-500);
    font-weight: 400;
    max-width: 480px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* ─── Pre-inscription CTA (zone publique) ─── */
.preinscription-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--navy-mid);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(26,58,110,0.35);
    letter-spacing: -0.1px;
    text-decoration: none;
}

    .preinscription-cta:hover {
        background: var(--navy);
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(26,58,110,0.45);
    }

    .preinscription-cta svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

.cta-arrow {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .cta-arrow svg {
        width: 14px;
        height: 14px;
    }

.cta-note {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 12px;
    font-weight: 400;
}

/* ─── Profil cards ─── */
.profiles-section {
    position: relative;
    z-index: 1;
    padding: 0 48px 64px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 20px;
    text-align: center;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.profile-card {
    background: var(--white);
    border: 1px solid rgba(15,32,68,0.08);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

    .profile-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--card-accent, var(--navy-mid));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .profile-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        border-color: transparent;
    }

        .profile-card:hover::before {
            transform: scaleX(1);
        }

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

    .card-icon svg {
        width: 26px;
        height: 26px;
        fill: white;
    }

.profile-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.profile-card p {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.6;
    font-weight: 400;
}

.card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 20px;
    color: var(--navy-mid);
    opacity: 0;
    transform: translateX(-6px);
    transition: var(--transition);
}

    .card-arrow svg {
        width: 14px;
        height: 14px;
    }

.profile-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Couleurs des cartes */
.card-admin {
    --card-accent: #1a3a6e;
}

.card-etudiant {
    --card-accent: #1b8f7a;
}

.card-enseignant {
    --card-accent: #8b5cf6;
}

.card-superadmin {
    --card-accent: #d97706;
}

.icon-admin {
    background: var(--navy-mid);
}

.icon-etudiant {
    background: var(--teal);
}

.icon-enseignant {
    background: #7c3aed;
}

.icon-superadmin {
    background: #d97706;
}

/* ─── Footer strip ─── */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 24px;
    font-size: 12px;
    color: var(--gray-500);
    border-top: 1px solid rgba(15,32,68,0.07);
}

/* ─────────────────────────────────
   MODAL PRÉINSCRIPTION
───────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,20,50,0.55);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    .modal-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 700px;
    max-height: 92vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
    opacity: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    padding: 32px 36px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-icon {
    width: 48px;
    height: 48px;
    background: var(--navy-mid);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .modal-icon svg {
        width: 22px;
        height: 22px;
        fill: white;
    }

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.3px;
}

.modal-header p {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 3px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    color: var(--gray-500);
}

    .modal-close:hover {
        background: var(--gray-100);
        color: var(--navy);
    }

    .modal-close svg {
        width: 16px;
        height: 16px;
    }

.modal-body {
    padding: 28px 36px 36px;
}

/* Steps indicator */
.steps-bar {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    transition: var(--transition);
}

    .step-circle.done {
        background: var(--teal);
        color: white;
    }

    .step-circle.active {
        background: var(--navy-mid);
        color: white;
    }

    .step-circle.idle {
        background: var(--gray-100);
        color: var(--gray-500);
        border: 1px solid var(--gray-300);
    }

.step-lbl {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    white-space: nowrap;
}

    .step-lbl.active {
        color: var(--navy);
    }

.step-line {
    flex: 1;
    height: 1px;
    background: var(--gray-300);
    margin: 0 10px;
}

    .step-line.done {
        background: var(--teal);
    }

/* Form elements */
.form-section {
    margin-bottom: 24px;
}

.form-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
}

.form-row {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

    .form-row.col2 {
        grid-template-columns: 1fr 1fr;
    }

    .form-row.col3 {
        grid-template-columns: 1fr 1fr 1fr;
    }

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-field label {
        font-size: 13px;
        font-weight: 500;
        color: var(--gray-700);
    }

        .form-field label .req {
            color: #e05c2a;
            margin-left: 2px;
        }

    .form-field input,
    .form-field select {
        height: 42px;
        border: 1.5px solid var(--gray-300);
        border-radius: var(--radius-sm);
        padding: 0 14px;
        font-size: 14px;
        font-family: 'DM Sans', sans-serif;
        color: var(--text);
        background: var(--white);
        outline: none;
        transition: var(--transition);
        width: 100%;
    }

        .form-field input:focus,
        .form-field select:focus {
            border-color: var(--navy-mid);
            box-shadow: 0 0 0 3px rgba(26,58,110,0.1);
        }

        .form-field input::placeholder {
            color: var(--gray-300);
        }

    .form-field select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a839e'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        padding-right: 36px;
        cursor: pointer;
    }

/* Radio diplôme */
.diploma-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.diploma-opt {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: var(--transition);
}

    .diploma-opt:hover {
        background: var(--off-white);
    }

    .diploma-opt.sel {
        border-color: var(--navy-mid);
        background: rgba(26,58,110,0.04);
    }

.rdot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.diploma-opt.sel .rdot {
    border-color: var(--navy-mid);
    background: var(--navy-mid);
}

.rdot-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: white;
    display: none;
}

.diploma-opt.sel .rdot-dot {
    display: block;
}

.dipl-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.dipl-sub {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Custom select spécialité */
.spec-wrap {
    position: relative;
}

.spec-trigger {
    height: 42px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 0 38px 0 14px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--gray-500);
    background: white;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

    .spec-trigger.has-val {
        color: var(--text);
    }

    .spec-trigger.open {
        border-color: var(--navy-mid);
        box-shadow: 0 0 0 3px rgba(26,58,110,0.1);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

.spec-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s;
}

.spec-trigger.open ~ .spec-chevron {
    transform: translateY(-50%) rotate(180deg);
}

.spec-dropdown {
    display: none;
    border: 1.5px solid var(--navy-mid);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: white;
    box-shadow: 0 8px 24px rgba(15,32,68,0.12);
}

    .spec-dropdown.open {
        display: block;
    }

.spec-search-wrap {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
}

.spec-search {
    width: 100%;
    height: 34px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    background: var(--off-white);
}

    .spec-search:focus {
        border-color: var(--navy-mid);
    }

.spec-list {
    max-height: 200px;
    overflow-y: auto;
}

.spec-item {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.12s;
}

    .spec-item:last-child {
        border-bottom: none;
    }

    .spec-item:hover {
        background: var(--off-white);
    }

    .spec-item.sel {
        background: rgba(26,58,110,0.05);
        color: var(--navy-mid);
        font-weight: 500;
    }

.spec-item-left {
    display: flex;
    flex-direction: column;
}

.spec-item-dept {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

.spec-code-badge {
    font-size: 11px;
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.spec-item.sel .spec-code-badge {
    background: rgba(26,58,110,0.1);
    color: var(--navy-mid);
}

.spec-selected-badge {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(26,58,110,0.05);
    border: 1.5px solid rgba(26,58,110,0.18);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: space-between;
}

    .spec-selected-badge.show {
        display: flex;
    }

.spec-sel-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-mid);
}

.spec-sel-meta {
    font-size: 12px;
    color: var(--navy-light);
    margin-top: 2px;
}

.spec-change-btn {
    font-size: 12px;
    color: var(--gray-500);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    background: white;
    transition: var(--transition);
    font-family: 'DM Sans', sans-serif;
}

    .spec-change-btn:hover {
        background: var(--gray-100);
    }

/* Modal footer */
.modal-footer {
    padding: 20px 36px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    bottom: 0;
    background: white;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.btn-outline {
    height: 42px;
    padding: 0 20px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}

    .btn-outline:hover {
        background: var(--gray-100);
    }

.btn-primary {
    height: 42px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--navy-mid);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

    .btn-primary:hover {
        background: var(--navy);
        transform: translateY(-1px);
    }

    .btn-primary svg {
        width: 16px;
        height: 16px;
    }

.btn-group {
    display: flex;
    gap: 10px;
}

/* Animations page load */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow {
    animation: fadeUp 0.5s ease both;
}

.hero h1 {
    animation: fadeUp 0.5s 0.1s ease both;
}

.hero p {
    animation: fadeUp 0.5s 0.2s ease both;
}

.cta-wrap {
    animation: fadeUp 0.5s 0.3s ease both;
}

.profiles-section {
    animation: fadeUp 0.5s 0.45s ease both;
}

@media (max-width: 768px) {
    header {
        padding: 16px 20px;
    }

    .hero {
        padding: 48px 20px 40px;
    }

    .profiles-section {
        padding: 0 20px 48px;
    }

    .modal-header, .modal-body, .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .form-row.col2, .form-row.col3 {
        grid-template-columns: 1fr;
    }

    .diploma-grid {
        grid-template-columns: 1fr;
    }
}


