/* =========================================================
   ENCM — Feuille de style principale
   Palette inspirée du logo ENCM (bleu marine + touche or "excellence")
   ========================================================= */

:root {
	--navy: #1c3a63;
	--navy-dark: #10233d;
	--blue: #2f548d;
	--blue-light: #4a72ad;
	--gold: #b08d36;
	--gold-light: #cda94f;
	--bg: #ffffff;
	--bg-alt: #f5f7fb;
	--text: #26313f;
	--muted: #6b7686;
	--border: #e4e8ef;
	--radius: 10px;
	--shadow: 0 10px 30px rgba(16, 35, 61, 0.08);
	--font-heading: 'Poppins', 'Inter', sans-serif;
	--font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--text);
	background: var(--bg);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text); }
ul { padding-left: 1.2em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.content-narrow { max-width: 820px; margin: 0 auto; }
.eyebrow {
	display: inline-block;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 10px;
}
.note-placeholder { color: var(--muted); font-style: italic; font-size: .92rem; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 28px;
	border-radius: 999px;
	font-weight: 600;
	font-size: .95rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
	white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--blue); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-ghost-sm { padding: 6px 16px; font-size: .78rem; background: var(--gold); color: #fff; border-radius: 999px; }
.btn-block { width: 100%; margin-top: 10px; }

/* =========================
   Topbar
   ========================= */
.topbar { background: var(--navy-dark); color: #cfd8e6; font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 24px; flex-wrap: wrap; gap: 8px; }
.topbar-contact { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-contact a { color: #cfd8e6; }
.topbar-contact a:hover { color: var(--gold-light); }
.topbar-address { display: none; }
.topbar-social { display: flex; align-items: center; gap: 14px; }
.topbar-social a:not(.btn) { color: #cfd8e6; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.icon-phone::before { content: "☎"; margin-right: 4px; }
.icon-mail::before { content: "✉"; margin-right: 4px; }
.icon-pin::before { content: "📍"; margin-right: 4px; }

/* =========================
   Header / nav
   ========================= */
.site-header { position: sticky; top: 0; z-index: 500; background: #fff; box-shadow: 0 2px 14px rgba(16,35,61,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 24px; }
.site-branding img, .custom-logo { max-height: 60px; width: auto; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-menu { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav-menu > li { position: relative; }
.nav-menu > li > a { font-weight: 600; font-size: .95rem; color: var(--navy); padding: 10px 2px; display: inline-block; }
.nav-menu > li > a:hover { color: var(--gold); }
.nav-menu ul { list-style: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 240px; box-shadow: var(--shadow); border-radius: 8px; padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .15s ease; }
.nav-menu li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu ul li a { display: block; padding: 9px 18px; font-size: .88rem; font-weight: 500; color: var(--text); }
.nav-menu ul li a:hover { background: var(--bg-alt); color: var(--navy); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--navy); display: block; }

/* =========================
   Hero slider
   ========================= */
.hero-slider { position: relative; min-height: 620px; overflow: hidden; background: var(--navy); }
.hero-slides { position: relative; min-height: 560px; }
.hero-slide {
	position: absolute; inset: 0;
	background-size: cover; background-position: center;
	opacity: 0; visibility: hidden; transition: opacity .6s ease;
	display: flex; align-items: center;
}
.hero-slide.is-active { opacity: 1; visibility: visible; position: relative; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(16,35,61,.92) 20%, rgba(28,58,99,.55) 70%); }
.hero-content { position: relative; z-index: 2; color: #fff; max-width: 640px; padding: 100px 24px 140px; }
.hero-content h1 { color: #fff; }
.hero-text p { color: #dbe2ee; font-size: 1.05rem; }
.hero-dots { position: absolute; bottom: 96px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; }
.hero-dots button.is-active { background: var(--gold); width: 24px; border-radius: 6px; }
.hero-arrow { position: absolute; top: 45%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 1.6rem; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; z-index: 3; }
.hero-arrow:hover { background: rgba(255,255,255,.3); }
.hero-arrow-prev { left: 20px; }
.hero-arrow-next { right: 20px; }
.hero-finder { position: relative; z-index: 4; margin-top: -56px; }
.finder-form { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.finder-label { font-weight: 700; color: var(--navy); font-size: .9rem; white-space: nowrap; }
.finder-form select { flex: 1; min-width: 160px; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--border); font-family: var(--font-body); }
.finder-form .btn { flex-shrink: 0; }

/* =========================
   Tabs (formations)
   ========================= */
.tabs-nav { display: flex; gap: 10px; justify-content: center; margin: 28px 0 36px; flex-wrap: wrap; }
.tab-btn { background: var(--bg-alt); border: none; padding: 12px 26px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--navy); }
.tab-btn.is-active { background: var(--navy); color: #fff; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* Cards grids */
.cards-grid { display: grid; gap: 22px; margin-top: 10px; }
.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid-4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid-6 { grid-template-columns: repeat(3, 1fr); }

.domain-card, .level-card {
	background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
	padding: 28px 24px; transition: box-shadow .2s ease, transform .2s ease;
}
.domain-card:hover, .level-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.domain-icon { font-size: 1.8rem; }
.domain-card h3, .level-card h3 { margin-top: 10px; }
.domain-card p, .level-card p { color: var(--muted); font-size: .92rem; margin-bottom: 0; }

.feature-card { background: #fff; border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: var(--shadow); }
.feature-icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.feature-card p { color: var(--text); font-size: .92rem; margin: 0; }

/* Stats */
.stats-section { background: var(--navy); color: #fff; text-align: center; }
.stats-section h2 { color: #fff; margin-bottom: 40px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-number { font-family: var(--font-heading); font-size: 2.6rem; font-weight: 800; color: var(--gold-light); }
.stat-suffix { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; color: var(--gold-light); margin-top: -20px; }
.stat-label { color: #cfd8e6; font-size: .9rem; margin-top: 6px; }
.stats-note { text-align: center; color: #9fb0c9; font-size: .78rem; margin-top: 34px; }

/* Campus */
.campus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.campus-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.check-list { list-style: none; padding: 0; margin: 18px 0; }
.check-list li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin: 0; }
.testimonial-card p { font-style: italic; color: var(--text); }
.testimonial-card cite { font-style: normal; font-weight: 600; color: var(--navy); font-size: .88rem; }

/* News */
.news-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; transition: box-shadow .2s ease, transform .2s ease; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.news-thumb img { width: 100%; height: 180px; object-fit: cover; }
.news-card h3, .news-card p, .news-card .news-date { padding-left: 20px; padding-right: 20px; }
.news-date { display: block; margin-top: 16px; font-size: .78rem; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.news-card h3 { margin-top: 6px; }
.news-card p { color: var(--muted); font-size: .9rem; padding-bottom: 20px; }
.section-cta { text-align: center; margin-top: 34px; }

/* FAQ accordion */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
	width: 100%; text-align: left; background: none; border: none; padding: 20px 4px;
	font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: var(--navy);
	cursor: pointer; position: relative; padding-right: 30px;
}
.accordion-trigger::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 1.3rem; color: var(--gold); transition: transform .2s ease; }
.accordion-item.is-open .accordion-trigger::after { content: "–"; }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.accordion-item.is-open .accordion-panel { max-height: 400px; }
.accordion-panel p { padding-bottom: 18px; color: var(--muted); }

/* Pre-footer CTA */
.pre-footer-cta { background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; }
.pre-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 48px 24px; flex-wrap: wrap; }
.pre-footer-cta h2 { color: #fff; margin-bottom: 6px; }
.pre-footer-cta p { color: #dbe2ee; margin: 0; }
.pre-footer-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #b9c4d6; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; padding: 60px 24px 40px; }
.footer-logo { max-height: 56px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-baseline { color: #d5deec; font-weight: 500; }
.footer-address { font-size: .88rem; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; font-size: .88rem; }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 14px; margin-top: 14px; }
.footer-social a { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.footer-widget-title { color: #fff; font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; font-size: .8rem; flex-wrap: wrap; gap: 10px; }
.footer-legal-menu { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }

/* Page hero (pages internes) */
.page-hero { background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; padding: 70px 0 50px; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero-lead { color: #dbe2ee; max-width: 680px; margin-top: 10px; }

/* Formations listing */
.filters-bar { display: flex; gap: 14px; margin-bottom: 30px; flex-wrap: wrap; }
.filters-bar select { padding: 11px 14px; border-radius: 8px; border: 1px solid var(--border); font-family: var(--font-body); }
.formation-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; padding-bottom: 20px; transition: box-shadow .2s ease, transform .2s ease; }
.formation-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.formation-thumb img { width: 100%; height: 170px; object-fit: cover; }
.formation-tags { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 20px 0; }
.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; letter-spacing: .03em; }
.tag-niveau { background: var(--navy); color: #fff; }
.tag-domaine { background: var(--bg-alt); color: var(--navy); border: 1px solid var(--border); }
.formation-card h3 { padding: 12px 20px 0; margin-bottom: 6px; }
.formation-card p { padding: 0 20px; color: var(--muted); font-size: .9rem; }
.link-arrow { padding: 0 20px; color: var(--gold); font-weight: 600; font-size: .88rem; }
.empty-state { text-align: center; padding: 50px 20px; background: var(--bg-alt); border-radius: var(--radius); }

/* Single formation */
.formation-single-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 44px; align-items: flex-start; }
.formation-single-thumb img { border-radius: var(--radius); margin-bottom: 24px; }
.sidebar-card { background: var(--bg-alt); border-radius: var(--radius); padding: 26px; position: sticky; top: 110px; }
.sidebar-card h3 { margin-bottom: 8px; }

/* Steps (admissions) */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 30px; }
.step-card { background: #fff; border-radius: var(--radius); padding: 30px 24px; box-shadow: var(--shadow); position: relative; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 14px; }

/* Team */
.team-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-align: center; }
.team-photo-placeholder { width: 100px; height: 100px; border-radius: 50%; background: var(--bg-alt); border: 2px dashed var(--border); margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; }
.contact-details { list-style: none; padding: 0; margin: 24px 0; }
.contact-details li { margin-bottom: 18px; font-size: .95rem; }
.contact-map iframe { border-radius: var(--radius); }
.contact-form { background: var(--bg-alt); border-radius: var(--radius); padding: 32px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .88rem; color: var(--navy); }
.form-row input, .form-row select, .form-row textarea {
	width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border);
	font-family: var(--font-body); font-size: .95rem; background: #fff;
}
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: .9rem; }
.form-notice-success { background: #e4f6e9; color: #22693a; }
.form-notice-error { background: #fce8e8; color: #a13030; }

/* Misc */
.pagination { text-align: center; margin-top: 30px; }
.single-thumb img { border-radius: var(--radius); margin-bottom: 24px; }

/* =========================
   Responsive
   ========================= */
@media (min-width: 992px) { .topbar-address { display: inline-flex; align-items: center; } }

@media (max-width: 991px) {
	.main-nav { position: fixed; top: 0; right: -320px; height: 100vh; width: 300px; background: #fff; flex-direction: column; padding: 90px 24px 24px; box-shadow: -10px 0 30px rgba(0,0,0,.1); transition: right .25s ease; z-index: 400; }
	.main-nav.is-open { right: 0; }
	.nav-menu { flex-direction: column; gap: 4px; width: 100%; }
	.nav-menu ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 14px; display: none; }
	.nav-menu li.is-open > ul { display: block; }
	.menu-toggle { display: flex; }
	.header-cta .btn-outline, .header-cta .btn-primary { display: none; }
	.cards-grid-3, .cards-grid-4, .cards-grid-6 { grid-template-columns: repeat(2, 1fr); }
	.stats-grid { grid-template-columns: repeat(2, 1fr); }
	.campus-grid, .contact-grid, .formation-single-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
	.testimonials-grid, .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.cards-grid-3, .cards-grid-4, .cards-grid-6 { grid-template-columns: 1fr; }
	.stats-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr; text-align: left; }
	.pre-footer-inner { flex-direction: column; text-align: center; }
	.hero-content { padding: 70px 20px 120px; }
	.finder-form { flex-direction: column; align-items: stretch; }
	.form-row-2col { grid-template-columns: 1fr; }
}
