/* Site public de l'auto-école : bleu marine, bleu clair, rouge ; police Poppins (arabe : Tajawal) */
.es { --es-b: #2b97d5; --es-r: #e31b23; --es-noir: #232323; font-family: "Poppins", "AE Arabe", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: #1d2b3a; background: #fff; }
[dir="rtl"] .es, .es[dir="rtl"] { font-family: "AE Arabe", "Poppins", Arial, sans-serif; }
.es a:not(.btn):not(.nav-link):not(.navbar-brand) { color: var(--es-b); text-decoration: none; }
.es-titre, .es-slogan, .es-hero-nom, .es-formule h3 { font-weight: 700; letter-spacing: -.01em; }
/* Bandeau et en-tête */
.es-annonce { background: var(--es-b); text-align: center; padding: .55rem 1rem; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; font-size: .92rem; }
.es-annonce a { color: #fff !important; }
.es-nav { background: #fff; padding: .9rem 0; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.es-logo { max-height: 62px; max-width: 200px; }
.es-marque { font-weight: 700; font-size: 1.35rem; color: var(--es-p); }
.es-nav .nav-link { color: var(--es-p) !important; text-transform: uppercase; font-weight: 500; font-size: .88rem; letter-spacing: .02em; padding: .5rem .7rem !important; white-space: nowrap; }
.es-nav .nav-link:hover { color: var(--es-b) !important; }
.es-btn-contact { background: var(--es-p); color: #fff !important; text-transform: uppercase; font-weight: 500; letter-spacing: .03em; border-radius: 0; padding: .65rem 1.3rem; white-space: nowrap; }
.es-btn-contact:hover { background: var(--es-b); }
.es-btn-rouge { background: var(--es-r); color: #fff !important; font-weight: 600; border-radius: 0; padding: .75rem 1.6rem; border: 0; }
.es-btn-rouge:hover { filter: brightness(1.08); }
.es-btn-bleu { background: var(--es-b); color: #fff !important; font-weight: 500; border-radius: 0; border: 0; padding: .75rem 1.6rem; }
.es-btn-bleu.btn-sm { padding: .45rem 1.4rem; }
.es-btn-bleu:hover { background: var(--es-p); }
/* Haut de page */
.es-hero { position: relative; padding: 4.5rem 0 3.5rem; background: linear-gradient(180deg, #d9eef8 0%, #eef7fc 55%, #fff 100%); overflow: hidden; }
.es-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--es-photo, none); background-size: cover; background-position: center; opacity: .35; }
.es-hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 180px; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 70%); }
.es-hero .container { z-index: 1; }
.es-slogan { color: var(--es-b); font-size: clamp(1rem, 2vw, 1.2rem); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.es-hero-logo { max-height: 220px; max-width: min(80%, 420px); margin: .6rem 0 1rem; }
.es-hero-nom { color: var(--es-p); font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; margin: .5rem 0 .9rem; }
.es-hero-titre { display: inline-block; font-weight: 600; color: #fff; background: var(--es-p); padding: .45rem 1.3rem; font-size: clamp(1.1rem, 2.4vw, 1.6rem); }
.es-hero-texte { max-width: 640px; margin-top: 1.1rem; font-size: 1.08rem; color: #3b4b5c; }
.es-chiffres { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 2.2rem; }
.es-chiffres > div { background: #fff; border: 1px solid #d5e6f1; padding: .8rem 1.3rem; min-width: 150px; }
.es-chiffres b { display: block; font-size: 1.6rem; color: var(--es-p); line-height: 1.1; }
.es-chiffres span { font-size: .85rem; color: #4b5b6b; }
/* Sections */
.es-section { padding: 4.5rem 0; }
.es-clair { background: #f4f8fb; }
.es-titre { text-align: center; color: var(--es-p); font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 1.5rem; }
.es-titre::after { content: ""; display: block; width: 70px; height: 4px; background: var(--es-r); margin: .7rem auto 0; }
.es-marine .es-titre::after { background: var(--es-b); }
.es-marine { background-color: #13385d; background-color: color-mix(in srgb, var(--es-p) 88%, #000); background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), radial-gradient(rgba(0, 0, 0, .12) 1px, transparent 1px); background-size: 4px 4px, 7px 7px; }
.es-ruban { background: var(--es-r); color: #fff; text-align: center; font-weight: 500; font-size: 1.15rem; padding: .45rem .8rem; }
/* Formations */
.es-formule { background: var(--es-p); color: #fff; padding: 1.1rem 1.1rem 1.6rem; display: flex; flex-direction: column; }
.es-visuel { height: 190px; display: flex; align-items: center; justify-content: center; gap: .8rem; color: #fff; }
.es-visuel i { font-size: 7rem; line-height: 1; opacity: .95; }
.es-visuel span { font-weight: 700; font-size: 3.2rem; color: var(--es-b); }
.es-visuel-img { padding: .8rem 0 0; }
.es-visuel-img img { width: 100%; height: 100%; object-fit: contain; }
.es-formule h3 { color: var(--es-b); font-size: 1.6rem; margin: .4rem 0 .6rem; }
.es-formule p { font-size: 1.02rem; line-height: 1.55; flex: 1; }
.es-lien { align-self: flex-end; color: var(--es-b) !important; font-size: 1.2rem; font-weight: 500; margin-inline-end: 1.5rem; }
.es-lien:hover { color: #fff !important; }
/* Pourquoi */
.es-rond { width: 78px; height: 78px; border-radius: 50%; background: var(--es-p); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 2.1rem; box-shadow: 0 0 0 6px #d7e9f5; box-shadow: 0 0 0 6px color-mix(in srgb, var(--es-b) 22%, #fff); }
.es-apropos { max-width: 820px; text-align: center; font-size: 1.08rem; color: #3b4b5c; }
.es-apropos-img { width: 100%; max-height: 380px; object-fit: cover; }
/* Agences */
.es-agence { background: #fff; padding: 1.1rem 1.1rem 1.4rem; text-align: center; color: #1d2b3a; }
.es-agence .es-ruban { margin-bottom: .7rem; }
.es-agence-img { width: calc(100% + 2.2rem); margin: -1.1rem -1.1rem 1rem; height: 170px; object-fit: cover; display: block; }
.es-carte { margin: 1rem -1.1rem 0; height: 200px; background: #e8eef4; }
.es-carte iframe { width: 100%; height: 100%; border: 0; display: block; }
.es-tel { display: block; font-size: 1.9rem; font-weight: 500; color: var(--es-b) !important; margin: .2rem 0; }
.es-mail { display: inline-block; font-size: 1.1rem; font-weight: 600; color: var(--es-p) !important; }
/* Préinscription */
.es-etapes { padding-inline-start: 1.2rem; }
.es-etapes li { margin-bottom: .6rem; }
.es-etapes li::marker { color: var(--es-r); font-weight: 700; }
.es-form { background: #fff; border: 1px solid #dbe5ee; border-top: 5px solid var(--es-p); padding: 1.5rem; margin: 0; }
.es-form .form-label { font-weight: 500; font-size: .9rem; margin-bottom: .2rem; color: var(--es-p); }
.es-form .form-control, .es-form .form-select { border-radius: 0; }
.es-btn { background: var(--es-r); color: #fff !important; font-weight: 600; border: 0; border-radius: 0; }
.es-btn:hover { filter: brightness(1.08); }
.es-merci { background: #ecfdf5; border: 1px solid #a7f3d0; padding: 2rem; text-align: center; color: #065f46; }
.es-merci i { font-size: 3rem; color: #10b981; }
.es .accordion-item { border-radius: 0 !important; }
.es .accordion-button { font-weight: 500; color: var(--es-p); }
.es .accordion-button:not(.collapsed) { color: #fff; background: var(--es-p); }
.es .accordion-button:not(.collapsed)::after { filter: brightness(0) invert(1); }
/* Pied de page */
.es-pied { background: var(--es-noir); color: #e5e5e5; }
.es-pied-titre { text-transform: uppercase; color: #9a9a9a; font-size: .95rem; margin-bottom: 1.2rem; }
.es-pied li { margin-bottom: .55rem; font-size: 1.05rem; }
.es-pied a { color: #f1f1f1 !important; }
.es-pied a:hover { color: var(--es-b) !important; }
.es-pied-bas { border-top: 1px solid #3a3a3a; text-align: center; padding: 1.2rem; font-size: .9rem; color: #9a9a9a; }
.es-wa { position: fixed; bottom: 22px; inset-inline-end: 22px; width: 62px; height: 62px; border-radius: 50%; background: #25d366; color: #fff !important; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); z-index: 1030; }
@media (max-width: 1199.98px) { .es-nav .nav-link { padding: .55rem 0 !important; } .es-btn-contact { margin-top: .5rem; } }
@media (min-width: 1200px) { .es-nav .navbar-nav { flex-wrap: wrap; justify-content: flex-end; } }
html, body { overflow-x: hidden; }
/* Pages ajoutées */
.es-page-titre { position: relative; background: var(--es-p); color: #fff; padding: 4rem 0 3.2rem; text-align: center; overflow: hidden; }
.es-page-titre::before { content: ""; position: absolute; inset: 0; background-image: var(--es-photo, none); background-size: cover; background-position: center; opacity: .3; }
.es-page-titre .container { position: relative; }
.es-page-titre h1 { font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0; }
.es-page-contenu { max-width: 860px; font-size: 1.06rem; line-height: 1.75; }
.es-page-contenu h2 { color: var(--es-p); font-weight: 700; font-size: 1.5rem; margin: 2rem 0 .8rem; }
.es-page-contenu ul { padding-inline-start: 1.3rem; } .es-page-contenu li::marker { color: var(--es-r); }
/* Espace candidat (site et application) */
.ec { background: #f2f5f8; min-height: 100vh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.ec-cadre { max-width: 560px; margin: 0 auto; padding-left: 14px; padding-right: 14px; }
.ec-haut { background: var(--es-p); color: #fff; padding: calc(12px + env(safe-area-inset-top)) 0 12px; position: sticky; top: 0; z-index: 10; }
.ec-logo { height: 38px; width: auto; max-width: 90px; background: #fff; border-radius: 8px; padding: 3px; object-fit: contain; }
.ec-ecole { font-weight: 600; font-size: 1.02rem; line-height: 1.2; }
.ec-sous { font-size: .8rem; opacity: .8; }
.ec-lang { color: #fff !important; border: 1px solid rgba(255, 255, 255, .5); border-radius: 20px; padding: .2rem .7rem; font-size: .85rem; }
.ec-haut button.ec-lang { background: none; line-height: 1.4; }
.ec-main { padding-top: 14px; }
.ec-q { border-top: 1px solid #eef0f3; padding-top: 12px; margin-top: 12px; }
.ec-q:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.ec-q img { max-width: 100%; border-radius: 10px; margin: 6px 0; }
.ec-rep { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #e4e7ec; border-radius: 10px; padding: 9px 12px; margin-top: 6px; cursor: pointer; }
.ec-rep:has(input:checked) { border-color: var(--es-p); background: color-mix(in srgb, var(--es-p) 8%, #fff); }
.ec-rep.bonne { border-color: #12b76a; background: #ecfdf3; }
.ec-rep.fausse { border-color: #f04438; background: #fef3f2; }
.ec-creneaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.ec-creneaux button { border: 1px solid color-mix(in srgb, var(--es-p) 35%, #fff); color: var(--es-p); background: #fff; border-radius: 10px; padding: 8px 0; font-weight: 600; }
.ec-creneaux button:active, .ec-creneaux button:focus { background: var(--es-p); color: #fff; }
.ec-niv { font-size: .72rem; }
.ec-carte { display: block; background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.ec-titre { font-size: .95rem; font-weight: 600; color: var(--es-p); margin-bottom: .5rem; }
.ec-bienvenue { background: var(--es-p); color: #fff; }
.ec-examen { display: flex; gap: 12px; align-items: center; border-inline-start: 5px solid var(--es-r); }
.ec-examen .bi { color: var(--es-r); font-size: 1.5rem; }
.ec-rond { width: 64px; height: 64px; border-radius: 50%; background: var(--es-p); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.ec-barre { height: 10px; background: #e7edf3; border-radius: 6px; overflow: hidden; margin-top: 4px; }
.ec-barre span { display: block; height: 100%; background: var(--es-b); border-radius: 6px; }
.ec-ligne { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid #eef1f4; font-size: .93rem; }
.ec-ligne:first-of-type { border-top: 0; }
.ec-date { min-width: 108px; font-size: .82rem; color: #475467; font-weight: 500; }
.ec-onglets { position: fixed; bottom: 0; inset-inline: 0; background: #fff; border-top: 1px solid #e4e7ec; display: flex; padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.ec-onglets > a, .ec-onglets button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 9px; font-size: .74rem; color: #667085 !important; background: none; border: 0; width: 100%; }
.ec-onglets form { flex: 1; display: flex; }
.ec-onglets .bi { font-size: 1.3rem; }
.ec-onglets .actif { color: var(--es-p) !important; font-weight: 600; }
/* Test de code façon examen : une question à la fois */
.ec-exam-haut { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.ec-chrono { font-weight: 700; font-size: 1.15rem; color: var(--es-p); min-width: 62px; text-align: end; font-variant-numeric: tabular-nums; }
.ec-chrono.urgent { color: #d92d20; animation: ec-pouls 1s infinite; }
@keyframes ec-pouls { 50% { opacity: .45; } }
.ec-temps { height: 6px; background: #e4e7ec; border-radius: 4px; overflow: hidden; margin: 8px 2px 0; }
.ec-temps span { display: block; height: 100%; width: 100%; background: var(--es-b); transition: width 1s linear; }
.ec-temps span.urgent { background: #d92d20; }
.ec-points { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 2px 12px; }
.ec-points span { width: 10px; height: 10px; border-radius: 50%; background: #d0d5dd; }
.ec-points span.ici { background: var(--es-p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--es-p) 25%, transparent); }
.ec-points span.fait { background: var(--es-b); }
.ec-points span.vide { background: #fda29b; }
.ec-eq { background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.ec-exam.js .ec-eq { display: none; }
.ec-exam.js .ec-eq.actif { display: block; animation: ec-entree .25s ease-out; }
.ec-exam:not(.js) .ec-exam-bas, .ec-exam:not(.js) .ec-points, .ec-exam:not(.js) .ec-temps, .ec-exam:not(.js) .ec-chrono { display: none; }
@keyframes ec-entree { from { opacity: 0; transform: translateY(8px); } }
.ec-eq-img { margin: -14px -16px 12px; background: #101828; border-radius: 14px 14px 0 0; overflow: hidden; text-align: center; }
.ec-eq-img img { width: 100%; max-height: 46vh; object-fit: contain; display: block; margin: 0 auto; }
.ec-eq-texte { display: flex; gap: 8px; align-items: flex-start; }
.ec-eq-q { font-size: 1.08rem; font-weight: 600; line-height: 1.5; flex: 1; margin-bottom: .4rem; }
.ec-eq-num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--es-p); color: #fff; font-size: .85rem; margin-inline-end: 8px; vertical-align: 2px; }
.ec-ecouter { border: 1px solid #d0d5dd; background: #fff; border-radius: 50%; width: 38px; height: 38px; color: var(--es-p); flex: none; }
.ec-choix { display: grid; gap: 8px; }
.ec-ch { display: flex; align-items: center; gap: 12px; border: 2px solid #e4e7ec; border-radius: 12px; padding: 12px 14px; cursor: pointer; font-size: 1.02rem; background: #fff; transition: border-color .15s, background .15s; }
.ec-ch input { position: absolute; opacity: 0; pointer-events: none; }
.ec-ch-n { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 2px solid #d0d5dd; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #475467; }
.ec-ch:has(input:checked) { border-color: var(--es-p); background: color-mix(in srgb, var(--es-p) 8%, #fff); }
.ec-ch:has(input:checked) .ec-ch-n { background: var(--es-p); border-color: var(--es-p); color: #fff; }
.ec-ch:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--es-p) 40%, transparent); outline-offset: 2px; }
.ec-exam-bas { display: flex; gap: 10px; position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 5; }
.ec-exam-bas .btn { padding: .8rem 1rem; font-weight: 600; border-radius: 12px; box-shadow: 0 4px 12px rgba(16, 24, 40, .12); }
.ec-exam-bas .btn-outline-secondary { background: #fff; }
.ec-fin { text-align: center; background: #fff; border-radius: 14px; padding: 40px 16px; color: var(--es-p); }
.ec:has(.ec-exam) { padding-bottom: 20px; }
/* Résultat du test */
.ec-score { width: 140px; height: 140px; border-radius: 50%; margin: 6px auto 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #e4e7ec 0); position: relative; }
.ec-score::before { content: ""; position: absolute; inset: 12px; background: #fff; border-radius: 50%; }
.ec-score > * { position: relative; }
.ec-score strong { font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ec-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-top: 10px; }
.ec-stats div { background: #f2f5f8; border-radius: 10px; padding: 8px 4px; font-size: .78rem; color: #475467; }
.ec-stats strong { display: block; font-size: 1.15rem; color: #101828; }
.ec-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 6px; }
.ec-grille a { height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem; text-decoration: none; color: #fff !important; background: #12b76a; }
.ec-grille a.ko { background: #f04438; }
.ec-correction.erreurs .ec-q.ok { display: none; }

/* Images des questions : pas de clic droit, d'appui long, de glisser ni d'impression (le filigrane porte le n° du candidat) */
.ec-protege { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ec-protege img { pointer-events: none; -webkit-user-drag: none; user-select: none; }
.ec-protege::after { content: ""; position: absolute; inset: 0; }
@media print { .ec-protege { display: none !important; } }
