/* Young Engineers — feuille de style publique (RTL/LTR via propriétés logiques) */
:root {
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --navy-3: #1d437b;
  --orange: #ff7a1a;
  --orange-dark: #e2630a;
  --white: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f3f6fb;
  --ink: #14233a;
  --muted: #55657d;
  --line: #dbe3ef;
  --danger: #b3261e;
  --ok: #17794a;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(11, 31, 58, .10);
  --font-ar: "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", "Geeza Pro", Tahoma, "Droid Arabic Kufi", Arial, sans-serif;
  --font-lat: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.7; font-size: 1.05rem;
  font-family: var(--font-lat);
}
body.lang-ar { font-family: var(--font-ar); line-height: 1.85; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy-3); }
a:hover { color: var(--orange-dark); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2, .h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: min(1140px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2rem); }
.center { text-align: center; }
.muted { color: var(--muted); }
.fine { font-size: .92rem; opacity: .85; }
.fine.dark { color: var(--muted); opacity: 1; }
.pre { white-space: pre-line; }

.icon { width: 1.35em; height: 1.35em; flex: none; vertical-align: -.3em; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--orange); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; cursor: pointer;
  padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700;
  text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn-accent { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(255, 122, 26, .35); }
.btn-accent:hover { background: var(--orange-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-ghost.dark { color: var(--navy); border-color: var(--line); }
.btn-ghost.dark:hover { background: #fff; color: var(--orange-dark); }
.btn-link { background: none; color: var(--navy-3); text-decoration: underline; }
.btn-sm { padding: .55rem 1.1rem; font-size: .95rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- en-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.15rem; }
.brand img { border-radius: 12px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; color: var(--navy); cursor: pointer; }
.nav-toggle .icon { width: 1.6rem; height: 1.6rem; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.nav-links { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: .5rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav-links a:hover { background: var(--bg-alt); color: var(--navy-3); }
.nav-tools { display: flex; align-items: center; gap: .8rem; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: .35rem .75rem; font-size: .92rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.lang-switch a:hover { background: var(--bg-alt); }
.lang-switch a.active { background: var(--navy); color: #fff; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: #fff; flex-direction: column; align-items: stretch;
    padding: 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); gap: 1rem; }
  .site-nav.open { display: flex; }
  .nav-links { flex-direction: column; }
  .nav-tools { flex-direction: column; align-items: stretch; }
  .lang-switch { justify-content: center; }
  .lang-switch a { flex: 1; text-align: center; }
}

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, var(--navy-3), transparent 60%), var(--navy); color: #fff; padding-block: clamp(2.5rem, 7vw, 5rem); overflow: hidden; }
.hero h1 { color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.hero .lead { font-size: 1.2rem; color: #dbe6f7; max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-block: 1.6rem; }
.hero-art img { width: 100%; max-width: 540px; margin-inline: auto; display: block; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35)); }
.badge { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); padding: .35rem .9rem; border-radius: 999px; font-size: .92rem; font-weight: 700; margin-bottom: 1rem; }
.dot { width: .6rem; height: .6rem; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 0 rgba(255, 122, 26, .7); animation: pulse 2s infinite; }
.launch-notice { display: flex; gap: .6rem; align-items: flex-start; color: #ffd9b8; font-size: .98rem; max-width: 36rem; }
.launch-notice .icon { margin-top: .3rem; color: var(--orange); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: start; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 360px; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 2.5rem; }
.kicker { color: var(--orange-dark); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; margin-bottom: .4rem; }
body.lang-ar .kicker { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.kicker.light { color: #ffb67a; }
.lead.dark { color: var(--muted); font-size: 1.15rem; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-bottom: 3rem; }
.about-art img { width: 100%; border-radius: 28px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.values-title { text-align: center; }
.values-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.1rem; }
.value-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: 0 2px 10px rgba(11, 31, 58, .04); }
.value-card h4 { font-size: 1.05rem; margin-bottom: .3rem; }
.value-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.value-icon, .card-icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; background: #fff1e5; color: var(--orange-dark); margin-bottom: .8rem; }
.value-icon .icon, .card-icon .icon { width: 1.6rem; height: 1.6rem; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.card { background: #fff; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; border-top: 5px solid var(--orange); }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11, 31, 58, .16); }
.card .card-icon { width: 3.6rem; height: 3.6rem; background: var(--navy); color: #fff; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin: 0; }
.card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; margin-bottom: 1rem; }
.note { text-align: center; color: var(--muted); margin-top: 1.6rem; font-size: .98rem; }

.prereg { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; }
.prereg h2 { color: #fff; }
.prereg-inner { text-align: center; max-width: 52rem; }
.prereg .lead { color: #dbe6f7; }
.steps { list-style: none; margin: 1.8rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; text-align: start; }
.steps li { display: flex; gap: .8rem; align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: .9rem 1rem; }
.step-n { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--orange); font-weight: 800; }
.prereg .fine { margin-top: 1.2rem; }

.faq-list { display: grid; gap: .8rem; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 1.2rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--orange-dark); line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--muted); padding-bottom: 1rem; margin: 0; }

.contact-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; text-align: center; display: grid; gap: .3rem; justify-items: center; }
.contact-card .icon { width: 2rem; height: 2rem; color: var(--orange-dark); }
.contact-card .label { color: var(--muted); font-size: .9rem; }
.contact-card a { font-weight: 700; word-break: break-all; }
.social-list { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 1.5rem 0 0; }
.social-list.center { justify-content: center; }

/* ---------- pied de page ---------- */
.site-footer { background: var(--navy); color: #cfdcf0; padding-top: 3rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffb67a; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.brand-footer { color: #fff; margin-bottom: .6rem; }
.footer-title { color: #fff; font-size: 1.05rem; }
.footer-text { margin: 0 0 .4rem; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-list li { display: flex; gap: .5rem; align-items: center; }
.site-footer .social-list a { background: rgba(255, 255, 255, .1); padding: .3rem .8rem; border-radius: 999px; text-decoration: none; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2rem; padding-block: 1.2rem; font-size: .92rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- formulaire ---------- */
.form-section { background: var(--bg-alt); min-height: 70vh; }
.notice { display: flex; gap: .6rem; background: #fff7ef; border: 1px solid #ffd9b8; border-radius: 14px; padding: .9rem 1rem; color: #7a3e0b; font-size: .98rem; }
.notice .icon { color: var(--orange-dark); margin-top: .25rem; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(1.2rem, 4vw, 2.2rem); box-shadow: var(--shadow); margin-top: 1.5rem; display: grid; gap: 1.3rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field { border: 0; padding: 0; margin: 0; min-width: 0; }
label, legend { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--navy); padding: 0; }
.req { color: var(--danger); }
input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; padding: .8rem 1rem; border: 2px solid var(--line); border-radius: 12px; min-height: 3rem;
}
textarea { resize: vertical; min-height: 7rem; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-3); outline: 3px solid rgba(29, 67, 123, .2); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.hint { color: var(--muted); font-size: .9rem; margin: .3rem 0 0; }
.field-error { color: var(--danger); font-weight: 700; font-size: .93rem; margin: .35rem 0 0; }
.error-summary { background: #fdecea; border: 2px solid var(--danger); color: #5f1410; border-radius: 14px; padding: 1rem 1.2rem; margin-block: 1rem; }
.error-summary ul { margin: .5rem 0 0; padding-inline-start: 1.2rem; }
.error-summary a { color: #5f1410; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }
.chip { position: relative; margin: 0; cursor: pointer; font-weight: 600; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.chip span { display: inline-block; padding: .6rem 1.1rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; transition: all .15s ease; }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input { width: 1.4rem; height: 1.4rem; margin-top: .3rem; flex: none; accent-color: var(--orange); }
.form-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

.flash-wrap { margin-top: 1rem; display: grid; gap: .6rem; }
.flash { padding: .8rem 1rem; border-radius: 12px; font-weight: 600; }
.flash-error { background: #fdecea; color: #5f1410; border: 1px solid #f3b8b3; }
.flash-success { background: #e8f6ee; color: #0e4d2e; border: 1px solid #b6e0c8; }

.confirm-icon { display: inline-grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--ok); color: #fff; margin-bottom: 1rem; }
.confirm-icon .icon { width: 2.4rem; height: 2.4rem; }
.ref-label { margin-bottom: .2rem; color: var(--muted); }
.ref { display: inline-block; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.8rem; font-weight: 800; letter-spacing: .08em; background: var(--bg-alt); border: 2px dashed var(--navy-3); border-radius: 14px; padding: .5rem 1.2rem; color: var(--navy); }
.error-code { font-size: 5rem; font-weight: 800; color: var(--orange); margin: 0; line-height: 1; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.prose p { color: #2b3b52; }

/* ---------- animations légères ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 26, .6); } 70% { box-shadow: 0 0 0 10px rgba(255, 122, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
