:root {
    --blue-950: #071d3a;
    --blue-900: #0a2a51;
    --blue-700: #0f4c81;
    --blue-100: #eaf3ff;
    --gold: #f1b434;
    --green: #0e7c66;
    --text: #1f2937;
    --muted: #64748b;
    --bg: #ffffff;
    --soft: #f6f8fb;
    --border: #dbe3ef;
    --shadow: 0 24px 70px rgba(7, 29, 58, .12);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.topbar { background: var(--blue-950); color: #dce8f6; font-size: .86rem; }
.topbar-inner { display: flex; justify-content: flex-end; gap: 26px; padding: 9px 0; flex-wrap: wrap; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.98); box-shadow: 0 1px 0 var(--border); }
.nav-wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; min-height: 86px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 250px; }
.brand img { width: 68px; height: 68px; object-fit: contain; border-radius: 50%; }
.brand strong { display:block; color: var(--blue-900); font-size: 1.35rem; letter-spacing: .02em; }
.brand small { display:block; color: var(--muted); font-size: .85rem; }
.main-nav { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.main-nav a { padding: 10px 12px; color: var(--blue-900); font-weight: 700; font-size: .93rem; border-radius: 999px; }
.main-nav a:hover, .main-nav a.active { background: var(--blue-100); color: var(--blue-700); }
.menu-toggle { display: none; border: 0; background: var(--blue-900); color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 1.1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 13px 22px; border: 2px solid transparent; font-weight: 800; cursor: pointer; transition: .2s ease; }
.btn-small { padding: 10px 17px; font-size: .9rem; }
.btn-primary { background: var(--gold); color: var(--blue-950); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(241,180,52,.25); }
.btn-outline { border-color: var(--blue-700); color: var(--blue-900); background: #fff; }
.btn-outline:hover { background: var(--blue-100); }
.btn-secondary { background: var(--blue-900); color: #fff; }

.hero { background: radial-gradient(circle at top right, rgba(241,180,52,.24), transparent 35%), linear-gradient(135deg, var(--blue-950), var(--blue-700)); color: #fff; padding: 76px 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 5rem); line-height: 1.02; margin: 12px 0 18px; letter-spacing: -.05em; }
.lead { font-size: 1.2rem; color: #e3eefb; max-width: 650px; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .14em; font-weight: 900; font-size: .78rem; color: var(--green); }
.hero .eyebrow { color: var(--gold); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-media { position: relative; }
.hero-media img { width: 100%; border-radius: 32px; box-shadow: var(--shadow); background: rgba(255,255,255,.12); }
.hero-card { position: absolute; left: -24px; bottom: 24px; background: #fff; color: var(--blue-900); border-radius: 22px; padding: 18px 22px; box-shadow: var(--shadow); }
.hero-card strong { display:block; font-size: 1.55rem; }
.hero-card span { color: var(--muted); font-weight: 700; }

.section { padding: 74px 0; }
.section-light { background: var(--soft); }
.section-accent { background: var(--blue-950); color: #fff; }
.section-heading { margin-bottom: 28px; }
.section-heading h2, .feature-copy h2, .page-hero h1, .news-layout h2 { color: var(--blue-950); font-size: clamp(2rem, 3vw, 3.1rem); line-height: 1.1; margin: 0; letter-spacing: -.03em; }
.section-accent h2 { color: #fff; }
.split { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.link-more { color: var(--blue-700); font-weight: 900; }
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.program-card, .profile-card, .content-card, .form-card, .contact-card, .fiche-card { background: #fff; border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.program-card { overflow: hidden; }
.program-card img { height: 190px; width: 100%; object-fit: cover; }
.program-card div { padding: 24px; }
.program-card h3 { margin: 0 0 10px; color: var(--blue-900); font-size: 1.22rem; }
.program-card p { color: var(--muted); margin: 0; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; align-items: center; }
.feature-copy p { color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.stats-grid div { background: var(--blue-100); border-radius: 28px; padding: 28px; min-height: 150px; }
.stats-grid strong { display: block; color: var(--blue-900); font-size: 2.5rem; line-height: 1; }
.stats-grid span { color: var(--muted); font-weight: 700; }
.rounded-img { border-radius: 30px; width: 100%; max-height: 480px; object-fit: cover; box-shadow: var(--shadow); }
.check-list { padding: 0; list-style: none; }
.check-list li { margin: 10px 0; padding-left: 30px; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 900; }

.news-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.news-layout p { color: #c9d8ea; }
.news-list { display: grid; gap: 14px; }
.news-list article { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 24px; padding: 22px; }
.news-list span { color: var(--gold); font-weight: 900; font-size: .82rem; text-transform: uppercase; }
.news-list h3 { margin: 8px 0; color: #fff; }

.page-hero { background: linear-gradient(135deg, var(--blue-950), var(--blue-700)); color: #fff; padding: 72px 0; }
.page-hero.compact { padding: 48px 0; }
.page-hero h1 { color: #fff; max-width: 850px; }
.page-hero p:not(.eyebrow) { color: #dce8f6; font-size: 1.1rem; max-width: 820px; }
.program-list, .research-list { display: grid; gap: 22px; }
.wide-card { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.wide-card img { height: 220px; width: 100%; object-fit: cover; border-radius: 22px; }
.wide-card h2 { margin: 0 0 10px; color: var(--blue-900); }
.wide-card p { color: var(--muted); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.profile-card { padding: 24px; text-align: center; }
.profile-card img { width: 170px; height: 170px; border-radius: 50%; margin: 0 auto 18px; object-fit: cover; }
.profile-card h2 { color: var(--blue-900); font-size: 1.2rem; }
.profile-card p { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 290px 1fr; gap: 34px; align-items: start; }
.side-menu { position: sticky; top: 112px; display: grid; background: var(--soft); border-radius: 24px; overflow: hidden; border: 1px solid var(--border); }
.side-menu a { padding: 16px 18px; border-bottom: 1px solid var(--border); color: var(--blue-900); font-weight: 800; }
.side-menu a:hover { background: var(--blue-100); }

.admission-intro { max-width: 920px; }
.content-card { padding: 34px; }
.content-card h2, .content-card h3 { color: var(--blue-900); }
.form-card { padding: 30px; }
.form-card label { display: grid; gap: 8px; margin-bottom: 18px; color: var(--blue-900); font-weight: 800; }
input, textarea, select { width: 100%; border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; font: inherit; color: var(--text); background: #fff; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(15,76,129,.16); border-color: var(--blue-700); }
.form-large h2 { color: var(--blue-900); margin-top: 30px; }
.form-large h2:first-child { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.span-2 { grid-column: span 2; }
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; }
.contact-card { padding: 28px; }
.contact-card h2 { color: var(--blue-900); }
.contact-card img { border-radius: 22px; margin-top: 18px; }
.login-wrap { max-width: 520px; }
.login-card { margin-inline: auto; }
.muted { color: var(--muted); }
.flash { margin-top: 22px; padding: 16px 20px; border-radius: 18px; font-weight: 700; }
.flash-success { background: #eafaf4; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }

.fiche-wrap { max-width: 900px; }
.fiche-toolbar { display: flex; gap: 12px; margin-bottom: 18px; }
.fiche-card { padding: 34px; color: #111827; }
.fiche-header { width: 100%; max-height: 180px; object-fit: contain; margin-bottom: 20px; }
.fiche-card h1 { text-align: center; color: #000; }
.fiche-date { text-align: right; }
.fiche-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0; }
.fiche-grid div { border: 1px solid #d1d5db; border-radius: 14px; padding: 14px; }
.fiche-grid dt { color: #4b5563; font-weight: 800; font-size: .82rem; text-transform: uppercase; }
.fiche-grid dd { margin: 4px 0 0; font-weight: 700; }
.fiche-card footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid #d1d5db; text-align: center; font-size: .9rem; }

.site-footer { background: var(--blue-950); color: #dce8f6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 58px 0; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { width: 74px; height: 74px; border-radius: 50%; background: #fff; }
.footer-brand strong { display:block; color: #fff; }
.footer-brand span { color: var(--gold); font-weight: 800; }
.site-footer h3 { color: #fff; }
.site-footer a { display:block; color: #dce8f6; margin: 8px 0; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.13); padding: 20px 0; text-align: center; color: #b9c8da; }

@media (max-width: 960px) {
    .nav-wrap { grid-template-columns: auto auto; }
    .main-nav { display: none; grid-column: 1 / -1; justify-content: flex-start; padding-bottom: 16px; }
    .main-nav.open { display: flex; }
    .menu-toggle { display: inline-flex; margin-left: auto; }
    .nav-wrap > .btn { grid-column: 1 / -1; justify-self: start; margin-bottom: 16px; }
    .hero-grid, .feature-grid, .news-layout, .contact-grid, .two-col { grid-template-columns: 1fr; }
    .program-grid, .cards-3, .footer-grid { grid-template-columns: 1fr 1fr; }
    .wide-card { grid-template-columns: 1fr; }
    .side-menu { position: static; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 24px, 1180px); }
    .topbar-inner { justify-content: flex-start; gap: 10px; }
    .brand { min-width: auto; }
    .brand img { width: 54px; height: 54px; }
    .brand small { display: none; }
    .hero { padding: 48px 0; }
    .program-grid, .cards-3, .footer-grid, .stats-grid, .form-grid, .fiche-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .split { display: block; }
    .hero-card { position: static; margin-top: 14px; }
}

@media print {
    .site-header, .site-footer, .no-print, .flash { display: none !important; }
    .section { padding: 0; }
    .container { width: 100%; }
    .fiche-card { box-shadow: none; border: none; }
}

/* === Ajouts LUJ : publicité, gradués, professeurs et administration === */
.hero-promotional .hero-main-img { aspect-ratio: 1.4 / 1; object-fit: cover; }
.hero-collage { min-height: 430px; }
.hero-floating-img { position: absolute; right: -26px; bottom: -26px; width: 44%; border: 8px solid #fff; border-radius: 28px; object-fit: cover; box-shadow: var(--shadow); }

.promo-band { padding: 34px 0; }
.promo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.promo-grid article { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.promo-grid strong { display: block; color: var(--blue-900); font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.promo-grid span { color: var(--muted); font-weight: 700; }

.advantage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.advantage-grid article { background: var(--blue-100); border-radius: 26px; padding: 24px; border: 1px solid var(--border); }
.advantage-grid h3 { color: var(--blue-900); margin: 0 0 8px; }
.advantage-grid p { color: var(--muted); margin: 0; }

.showcase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.showcase-card { background: #fff; border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.showcase-card img { width: 100%; height: 260px; object-fit: cover; }
.showcase-card div { padding: 24px; }
.showcase-card h3 { color: var(--blue-900); margin: 0 0 10px; }
.showcase-card p { color: var(--muted); margin: 0; }
.gallery-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gallery-2 img { width: 100%; height: 420px; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.highlight-card h3 { color: var(--blue-900); }
.highlight-card p { color: var(--muted); }

.teacher-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.teacher-card { text-align: left; }
.teacher-card img { width: 100%; height: 245px; border-radius: 22px; margin-bottom: 18px; }
.teacher-card h2 { margin-bottom: 6px; }
.teacher-title { color: var(--blue-700) !important; font-weight: 900; }

.result-wrap { display: grid; grid-template-columns: 420px 1fr; gap: 28px; align-items: start; }
.result-card { background: #fff; border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); padding: 30px; }
.result-card h2 { color: var(--blue-900); margin-top: 0; }
.result-box { border-radius: 24px; padding: 22px; display: grid; gap: 8px; margin-top: 20px; }
.result-box strong { font-size: 1.2rem; }
.result-box.accepted { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.result-box.refused { background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; }
.result-box.pending { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.result-note { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.result-note h3 { color: var(--blue-900); margin-top: 0; }

.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.admin-shell { display: grid; grid-template-columns: 290px 1fr; min-height: calc(100vh - 180px); background: var(--soft); }
.admin-sidebar { background: var(--blue-950); color: #fff; padding: 26px; display: flex; flex-direction: column; gap: 24px; }
.admin-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 900; font-size: 1.05rem; }
.admin-brand img { width: 54px; height: 54px; border-radius: 50%; background: #fff; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar nav a { color: #dce8f6; padding: 13px 14px; border-radius: 16px; font-weight: 800; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,.12); color: var(--gold); }
.admin-logout { width: 100%; color: #eb0b49; border-color: rgba(255,255,255,.25); }
.admin-main { padding: 34px; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.admin-topbar h1 { margin: 0; color: var(--blue-950); font-size: clamp(1.9rem, 3vw, 2.8rem); }
.admin-user { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 12px 18px; font-weight: 900; color: var(--blue-900); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.admin-stat-grid article, .admin-card { background: #fff; border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.admin-stat-grid article { padding: 24px; }
.admin-stat-grid span { color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; }
.admin-stat-grid strong { display: block; color: var(--blue-950); font-size: 2.4rem; line-height: 1; margin: 8px 0; }
.admin-stat-grid small { color: var(--muted); font-weight: 700; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.admin-card { padding: 26px; overflow: hidden; }
.admin-card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-card-header h2, .admin-card h2 { color: var(--blue-900); margin: 0; }
.admin-card-header a, .table-link { color: var(--blue-700); font-weight: 900; }
.admin-list { display: grid; gap: 12px; }
.admin-list a { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: var(--soft); }
.admin-list strong { color: var(--blue-900); }
.admin-list span { color: var(--muted); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table th { color: var(--blue-900); background: var(--soft); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.status-pill { display: inline-flex; padding: 7px 11px; border-radius: 999px; font-size: .82rem; font-weight: 900; white-space: nowrap; }
.status-pill.pending, .status-pill.en_attente { color: #92400e; background: #fef3c7; }
.status-pill.ok, .status-pill.accepte { color: #065f46; background: #d1fae5; }
.status-pill.refuse { color: #9f1239; background: #ffe4e6; }
.admin-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.admin-dl div { background: var(--soft); border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.admin-dl dt { color: var(--muted); font-weight: 900; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.admin-dl dd { color: var(--blue-900); font-weight: 800; margin: 4px 0 0; }
.message-body { background: var(--soft); border: 1px solid var(--border); border-radius: 22px; padding: 22px; white-space: pre-line; color: var(--text); margin-bottom: 22px; }
.admin-filter { display: grid; grid-template-columns: 1.2fr .7fr 1fr auto; gap: 12px; margin-bottom: 18px; }
.admin-decision-form { display: grid; gap: 18px; margin-top: 18px; }
.admin-decision-form label { display: grid; gap: 8px; color: var(--blue-900); font-weight: 900; }
.checkbox-line { display: flex !important; align-items: center; gap: 12px; }
.checkbox-line input { width: auto; }

@media (max-width: 1100px) {
    .teacher-grid { grid-template-columns: repeat(2, 1fr); }
    .promo-grid, .showcase-grid, .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .result-wrap, .admin-grid-2 { grid-template-columns: 1fr; }
    .admin-filter { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; }
    .admin-sidebar nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .hero-floating-img { position: static; width: 100%; margin-top: 14px; }
    .promo-grid, .showcase-grid, .teacher-grid, .advantage-grid, .admin-stat-grid, .admin-dl, .admin-filter, .gallery-2 { grid-template-columns: 1fr; }
    .admin-main { padding: 20px; }
    .admin-topbar { display: block; }
}
