/* ============================================================
   login-schools.css — CortyAcademia
   Page de découverte des écoles partenaires
   Palette : bleu nuit #031c38 + or #d29a2b
   ============================================================ */

:root {
    --navy: #031c38;
    --navy-light: #0a2d5a;
    --gold: #d29a2b;
    --gold-light: #e8b84a;
    --gold-dark: #b8860b;
    --gold-gradient: linear-gradient(135deg, #d29a2b 0%, #e8b84a 50%, #b8860b 100%);
    --white: #ffffff;
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-bg: rgba(255, 255, 255, 0.045);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body.schools-page {
    font-family: 'Poppins', 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--navy);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Décor de fond ─────────────────────────────────────────── */
.schools-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 12% 18%, rgba(26, 58, 106, 0.9), transparent 38%),
        radial-gradient(ellipse at 88% 80%, rgba(210, 154, 43, 0.18), transparent 30%),
        linear-gradient(135deg, #031c38 0%, #0a2d5a 58%, #031c38 100%);
    overflow: hidden;
}

.schools-bg::before,
.schools-bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.schools-bg::before {
    width: 580px;
    height: 580px;
    top: -310px;
    right: -130px;
    border: 1px solid rgba(232, 184, 74, 0.15);
    box-shadow: 0 0 0 42px rgba(255, 255, 255, 0.018), 0 0 0 95px rgba(255, 255, 255, 0.014);
}
.schools-bg::after {
    width: 460px;
    height: 460px;
    bottom: -300px;
    left: -120px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.02), 0 0 0 82px rgba(255, 255, 255, 0.014);
}

.aurora {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.18;
}
.aurora-blue { background: #397fc2; left: 8%; top: 10%; }
.aurora-gold { background: var(--gold); right: 9%; bottom: 4%; opacity: 0.12; }

/* ── Main ──────────────────────────────────────────────────── */
.schools-main {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ────────────────────────────────────────────────── */
.schools-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.schools-back,
.schools-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
}
.schools-back:hover,
.schools-login-btn:hover {
    background: rgba(232, 184, 74, 0.12);
    border-color: rgba(232, 184, 74, 0.35);
    color: var(--gold-light);
    transform: translateY(-1px);
}
.schools-login-btn {
    background: var(--gold-gradient);
    border-color: transparent;
    color: var(--navy);
}
.schools-login-btn:hover {
    color: var(--navy);
    filter: brightness(1.06);
    box-shadow: 0 8px 20px rgba(210, 154, 43, 0.35);
}

/* ── Hero ──────────────────────────────────────────────────── */
.schools-hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 12px;
}

.schools-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 8px 18px 8px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.schools-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: var(--gold-gradient);
    border-radius: 12px;
    font-size: 20px;
}
.schools-brand-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.3px;
    text-align: left;
}
.schools-brand-tag {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-top: 1px;
    text-align: left;
}

.schools-title {
    font-size: clamp(28px, 4.5vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin: 0 0 14px;
    color: var(--white);
}
.schools-title span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.schools-subtitle {
    max-width: 620px;
    margin: 0 auto 28px;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
}
.schools-subtitle strong {
    color: var(--gold-light);
    font-weight: 700;
}

/* ── Barre de recherche ────────────────────────────────────── */
.schools-search {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}
.schools-search input {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 50px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}
.schools-search input::placeholder { color: rgba(255, 255, 255, 0.45); }
.schools-search input:focus {
    border-color: var(--gold-light);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 4px rgba(232, 184, 74, 0.15);
}
.schools-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-light);
    font-size: 15px;
    pointer-events: none;
}
.schools-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 12px;
    transition: all 0.2s ease;
}
.schools-search-clear:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.schools-counter {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}
.schools-counter strong { color: var(--gold-light); }

/* ── Grille des écoles ─────────────────────────────────────── */
.schools-list-wrap {
    flex: 1;
    margin-bottom: 48px;
}

.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

/* ── Carte école ───────────────────────────────────────────── */
.school-card {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.school-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.school-card:hover {
    transform: translateY(-6px);
    border-color: rgba(232, 184, 74, 0.35);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(232, 184, 74, 0.15);
}
.school-card:hover::before { opacity: 1; }

.school-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0;
}
.school-logo {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(232, 184, 74, 0.3);
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
    color: var(--gold-light);
    font-size: 22px;
    font-weight: 800;
}
.school-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.school-logo-initial {
    background: var(--gold-gradient);
    color: var(--navy);
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
}

.school-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.school-card-body {
    padding: 14px 20px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.school-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.school-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 0.4px;
}
.school-code i { font-size: 10px; opacity: 0.7; }

.school-meta {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.school-meta li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}
.school-meta i {
    color: var(--gold-light);
    font-size: 11px;
    margin-top: 2px;
    flex-shrink: 0;
}

.school-card-footer {
    padding: 0 20px 20px;
}
.school-select-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: var(--gold-gradient);
    color: var(--navy);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.school-select-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(210, 154, 43, 0.35);
}
.school-select-btn i { font-size: 12px; }

/* ── Aucun résultat ────────────────────────────────────────── */
.schools-no-results,
.schools-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
}
.schools-empty-icon {
    font-size: 48px;
    margin-bottom: 14px;
}
.schools-no-results h2,
.schools-empty h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 8px;
}
.schools-no-results p,
.schools-empty p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    max-width: 440px;
    margin: 0 auto 20px;
    line-height: 1.6;
}
.schools-empty a { color: var(--gold-light); font-weight: 600; }
.schools-empty a:hover { text-decoration: underline; }

.schools-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--gold-gradient);
    color: var(--navy);
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.schools-cta-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(210, 154, 43, 0.35);
}

/* ── Bloc CTA bas de page ──────────────────────────────────── */
.schools-cta {
    margin-top: 24px;
}
.schools-cta-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(210, 154, 43, 0.1), rgba(232, 184, 74, 0.05));
    border: 1px solid rgba(232, 184, 74, 0.25);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.schools-cta-icon {
    font-size: 36px;
    flex-shrink: 0;
}
.schools-cta-content { flex: 1; min-width: 0; }
.schools-cta-content h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 4px;
    letter-spacing: -0.2px;
}
.schools-cta-content p {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.5;
}

/* ── Footer ────────────────────────────────────────────────── */
.schools-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
}
.schools-footer a {
    color: rgba(232, 184, 74, 0.85);
    font-weight: 600;
}
.schools-footer a:hover { color: var(--gold-light); text-decoration: underline; }
.schools-footer-sep { margin: 0 6px; opacity: 0.5; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .schools-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .schools-cta-card {
        flex-direction: column;
        text-align: center;
        padding: 22px 20px;
    }
}

@media (max-width: 600px) {
    .schools-main { padding: 16px 14px 32px; }
    .schools-header { margin-bottom: 24px; }
    .schools-back span { display: none; }
    .schools-back,
    .schools-login-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    .schools-title { letter-spacing: -0.8px; }
    .schools-subtitle { font-size: 13px; }
    .schools-search input {
        height: 48px;
        font-size: 13px;
        padding: 0 44px 0 44px;
    }
    .schools-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .school-card-header { padding: 16px 16px 0; }
    .school-card-body { padding: 12px 16px 16px; }
    .school-card-footer { padding: 0 16px 16px; }
    .schools-no-results,
    .schools-empty { padding: 40px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}