/* ============================================================
   Studio Voix — feuille de style (maquette_1)
   Deux thèmes : clair (défaut) et sombre, via html[data-theme].
   ============================================================ */

/* ---- Thème clair ---- */
:root,
html[data-theme="light"] {
    --bg: #fbfaff;
    --bg-soft: #f3f0fc;
    --card: #ffffff;
    --text: #15162c;
    --muted: #5d6280;
    --brand: #5a2de0;
    --brand-2: #7244f0;
    --btn-a: #5a2de0;
    --btn-b: #7244f0;
    --pro: #f5a623;
    --border: #e9e5f6;
    --radius: 20px;
    --shadow: 0 10px 34px rgba(62,42,140,.08), 0 2px 6px rgba(62,42,140,.04);

    --header-bg: rgba(255,255,255,.88);
    --brand-soft: #ece5fd;
    --hero-a: #efe7ff;
    --hero-b: #dfe8ff;
    --hero-base: #f7f4ff;
    --foot-1: #ded2fb;
    --foot-2: #c9bbf7;
    --foot-bg: #c9bbf7;
    --foot-text: #2c2857;
    --rec: #ef2650;
    --rec-glow: rgba(239,38,80,.18);
    --wave: #c9c3e6;
    --wave-active: #5a2de0;
    --wave-a: #9d8cf8;
    --wave-b: #c8a8fa;
    --ok: #12a05a;
    --panel: #fdfcff;
    --panel-border: #d9cff6;

    --t-violet-bg: #ece5fd; --t-violet: #5a2de0;
    --t-sky-bg: #e3f1fd;    --t-sky: #1677d2;
    --t-pink-bg: #fde6ec;   --t-pink: #e22a58;
    --t-indigo-bg: #e5ebfd; --t-indigo: #2c55d6;
    --t-green-bg: #e0f6ea;  --t-green: #129a57;
    --t-amber-bg: #fff2d9;  --t-amber: #e8930c;
}

/* ---- Thème sombre ---- */
html[data-theme="dark"] {
    --bg: #0f1020;
    --bg-soft: #1b1b34;
    --card: #17182d;
    --text: #eeedf7;
    --muted: #a7a9c4;
    --brand: #ab92ff;
    --brand-2: #c0abff;
    --btn-a: #5a2de0;
    --btn-b: #7a4ef2;
    --border: #2b2b49;
    --shadow: 0 10px 34px rgba(0,0,0,.34), 0 2px 6px rgba(0,0,0,.2);

    --header-bg: rgba(15,16,32,.88);
    --brand-soft: rgba(171,146,255,.15);
    --hero-a: #241d4d;
    --hero-b: #182446;
    --hero-base: #14142a;
    --foot-1: #2a2355;
    --foot-2: #352b6a;
    --foot-bg: #352b6a;
    --foot-text: #eeedf7;
    --rec: #ff4d6d;
    --rec-glow: rgba(255,77,109,.2);
    --wave: #3d3c63;
    --wave-active: #ab92ff;
    --wave-a: #7c6ef0;
    --wave-b: #b89bff;
    --ok: #3ecf8e;
    --panel: #1b1b34;
    --panel-border: #383663;

    --t-violet-bg: rgba(171,146,255,.16); --t-violet: #bda8ff;
    --t-sky-bg: rgba(90,175,250,.16);     --t-sky: #79bdf8;
    --t-pink-bg: rgba(255,100,140,.16);   --t-pink: #ff8aa8;
    --t-indigo-bg: rgba(120,145,255,.16); --t-indigo: #9db1ff;
    --t-green-bg: rgba(62,207,142,.16);   --t-green: #5dd8a1;
    --t-amber-bg: rgba(245,166,35,.16);   --t-amber: #f7bb55;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background .2s ease, color .2s ease;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.02em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.container { width: 100%; max-width: 1172px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.ico { width: 1.25em; height: 1.25em; flex: none; display: block; }
html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Header --- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--border);
}
.nav { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; color: var(--text); display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); font-size: 1.35rem; }
.brand-accent { color: var(--brand); }
.nav-panel { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a, .nav-drop > summary {
    display: flex; align-items: center; gap: .3rem;
    padding: .42rem .85rem; border-radius: 999px;
    color: var(--text); font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap;
}
.nav-links > a:hover, .nav-drop > summary:hover { background: var(--bg-soft); text-decoration: none; }
.nav-links > a.active, .nav-drop > summary.active { background: var(--brand-soft); color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn.nav-toggle { display: none; margin-inline-start: auto; }

/* Menus déroulants */
.drop { position: relative; }
.drop > summary { list-style: none; }
.drop > summary::-webkit-details-marker { display: none; }
.drop > summary .ico:last-child { width: 1em; height: 1em; transition: transform .15s ease; }
.drop[open] > summary .ico:last-child { transform: rotate(180deg); }
.drop-menu {
    position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 30;
    width: 320px; padding: 8px;
    background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.drop-menu a { display: flex; gap: 12px; padding: 10px; border-radius: 12px; color: var(--text); }
.drop-menu a:hover, .drop-menu a.active { background: var(--bg-soft); text-decoration: none; }
.drop-menu strong { display: block; font-size: .9rem; }
.drop-menu small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.drop-icon { color: var(--brand); padding-top: 2px; }

.lang-drop > summary { display: flex; align-items: center; gap: .3rem; padding: .42rem .4rem; font-size: .9rem; font-weight: 600; cursor: pointer; }
.lang-drop .drop-menu { inset-inline-start: auto; inset-inline-end: 0; }
.lang-switch { width: 340px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.lang-switch a { padding: .42rem .7rem; border-radius: 9px; font-size: .88rem; font-weight: 600; }
.lang-switch a.active { background: var(--brand-soft); color: var(--brand); }

.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; background: transparent; border: 0; border-radius: 12px; color: var(--text); font-size: 1rem; cursor: pointer; }
.icon-btn:hover { background: var(--bg-soft); }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* --- Boutons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .62rem 1.15rem; border-radius: 12px;
    background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
    color: #fff; font-weight: 700; font-size: 1rem; border: 1px solid transparent; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; opacity: .94; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: .5rem 1.05rem; font-size: .88rem; white-space: nowrap; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1rem; border-radius: 16px; }
.btn-lg:not(.btn-ghost) { box-shadow: 0 12px 24px rgba(90,45,224,.26); }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); opacity: 1; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row-spaced { margin-top: 18px; }
.btn-row-inline { margin-bottom: 18px; }
.btn-row-center { justify-content: center; margin-top: 28px; }

/* --- Pages outils --- */
.page { padding: 60px 0 24px; }
.page-head { text-align: center; margin-bottom: 36px; }
.page-head h1 { font-size: 2.4rem; font-weight: 800; }
.badge, .eyebrow {
    display: inline-block; padding: .3rem .85rem; border-radius: 999px;
    background: var(--brand-soft); color: var(--brand);
    font-size: .85rem; font-weight: 600; margin-bottom: 1rem;
}
.lead { font-size: 1.1rem; color: var(--muted); max-width: 52ch; }
.lead.center { margin: 0 auto; text-align: center; }
.small { font-size: .85rem; }

/* --- Hero --- */
.hero {
    position: relative; overflow: hidden; padding: 48px 0 118px;
    background:
        radial-gradient(760px 480px at 88% 8%, var(--hero-a), transparent 72%),
        radial-gradient(900px 420px at 100% 100%, var(--hero-b), transparent 70%),
        var(--hero-base);
}
.hero::after {
    content: ''; position: absolute; left: -12%; right: -12%; bottom: -74px; height: 130px;
    background: var(--bg); border-radius: 50%;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 20px; }
.hero h1 { font-size: clamp(2.05rem, 3.3vw, 2.5rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: .55em; }
.hero h1 .accent { color: var(--brand); }
.hero-sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 26px; }
.hero-cta { margin-bottom: 30px; }
.hero-art { display: block; width: 100%; height: auto; }
.trust { display: flex; flex-wrap: wrap; gap: 12px 30px; font-size: .86rem; font-weight: 600; }
.trust li { display: flex; align-items: center; gap: .5rem; }
.trust .ico { color: var(--brand); }

/* --- Outils rapides --- */
.quick { position: relative; z-index: 2; margin-top: -58px; }
.quick-grid {
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; padding: 14px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.quick-item {
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
    padding: 14px 8px; border-radius: 16px; color: var(--text); font-weight: 600; font-size: .9rem; line-height: 1.3;
    transition: background .15s ease, transform .15s ease;
}
.quick-item:hover { background: var(--bg-soft); text-decoration: none; transform: translateY(-2px); }
.quick-item.current { background: var(--brand-soft); }
.quick-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; font-size: 1.15rem; }
.tone-violet { background: var(--t-violet-bg); color: var(--t-violet); }
.tone-sky { background: var(--t-sky-bg); color: var(--t-sky); }
.tone-pink { background: var(--t-pink-bg); color: var(--t-pink); }
.tone-indigo { background: var(--t-indigo-bg); color: var(--t-indigo); }
.tone-green { background: var(--t-green-bg); color: var(--t-green); }
.tone-amber { background: var(--t-amber-bg); color: var(--t-amber); }

/* --- Enregistreur --- */
.rec-section { padding: 32px 0 0; }
.rec-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: 44px;
    padding: 28px 36px 26px 42px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
html[dir="rtl"] .rec-card { padding: 28px 42px 26px 36px; }
.rec-copy h2 { font-size: 1.85rem; font-weight: 800; }
.rec-copy p { color: var(--muted); margin: 0 0 26px; }
.checks { display: grid; gap: 10px; font-weight: 500; font-size: .96rem; }
.checks li { display: flex; align-items: center; gap: .7rem; }
.checks .ico { color: var(--ok); }
.rec-panel { padding: 22px 26px; text-align: center; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 24px; }
.counter { font-size: 2.45rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rec-waves { display: flex; justify-content: space-between; gap: 18%; margin: 12px 0 2px; }
.rec-waves canvas { width: 41%; flex: 1; height: 60px; min-width: 0; display: block; }
.rec-controls { display: flex; align-items: center; justify-content: center; gap: clamp(28px, 10%, 70px); }
.round-btn {
    display: grid; place-items: center; width: 44px; height: 44px; flex: none;
    border: 1px solid var(--border); border-radius: 50%; background: var(--card); color: var(--text);
    font-size: 1rem; cursor: pointer; box-shadow: 0 4px 12px rgba(62,42,140,.1);
    transition: border-color .15s ease, color .15s ease;
}
.round-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.round-btn:disabled { opacity: .45; cursor: not-allowed; }
.record-btn {
    display: grid; place-items: center; width: 76px; height: 76px; flex: none;
    border: 0; border-radius: 50%; background: var(--rec); color: #fff; font-size: 1.35rem; cursor: pointer;
    box-shadow: 0 0 0 5px var(--card), 0 0 0 7px var(--rec-glow), 0 10px 24px var(--rec-glow);
}
.record-btn .icon-stop { display: none; width: 24px; height: 24px; border-radius: 5px; background: #fff; }
.record-btn.recording .icon-mic { display: none; }
.record-btn.recording .icon-stop { display: block; }
.record-btn.recording { animation: rec-pulse 1.5s ease-in-out infinite; }
@keyframes rec-pulse { 50% { box-shadow: 0 0 0 5px var(--card), 0 0 0 16px var(--rec-glow), 0 10px 24px var(--rec-glow); } }
.hint { margin-top: 12px; font-size: .84rem; font-weight: 500; min-height: 20px; }
.rec-settings { margin-top: 14px; text-align: start; }
.playback { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); text-align: start; }
.playback audio { margin-top: 0; }
.playback .btn-row { margin-top: 12px; }

/* --- Comment ça marche --- */
.how { padding: 34px 0 0; }
.how h2 { text-align: center; font-size: 1.8rem; font-weight: 800; margin-bottom: 22px; }
.steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 22px; }
.step { display: flex; align-items: center; gap: 18px; height: 100%; padding: 18px 20px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--btn-a); color: #fff; font-size: .86rem; font-weight: 700; }
.step-icon { color: var(--brand); font-size: 1.6rem; flex: none; }
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .15em; }
.step p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.step-arrow { color: var(--muted); }

/* --- Avantages --- */
.benefits { padding: 56px 0 8px; }
.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.benefit { display: flex; gap: 16px; }
.benefit-icon { display: grid; place-items: center; width: 58px; height: 58px; flex: none; border-radius: 50%; font-size: 1.3rem; }
.benefit h3 { font-size: .98rem; font-weight: 700; margin: 4px 0 .3em; }
.benefit p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }

/* --- Ateliers des outils --- */
.teaser { padding: 8px 0 64px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.workspace {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    max-width: 680px; margin: 0 auto 64px; padding: 34px;
}
.dropzone {
    border: 1.5px dashed var(--panel-border); border-radius: 16px; padding: 36px 20px; text-align: center;
    cursor: pointer; transition: border-color .15s ease, background .15s ease; margin-bottom: 22px;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-icon { font-size: 1.7rem; margin-bottom: .4rem; }
.dropzone p { color: var(--muted); margin: 0; font-size: .95rem; }
.dropzone input[type=file] { display: none; }

.file-list { list-style: none; padding: 0; margin: 0 0 20px; }
.file-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: .92rem; padding: 10px 14px; background: var(--bg-soft);
    border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px;
}
.file-list li .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list li .file-actions { display: flex; gap: 6px; }
.file-list li button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
.file-list li button:hover { color: var(--brand); }

.field-row { display: flex; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.field { flex: 1; min-width: 140px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field select, .field input[type=number], .field input[type=text] {
    width: 100%; padding: .55rem .7rem; border-radius: 12px; font-family: inherit;
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font-size: .95rem;
}
.field select:focus, .field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.range-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brand); }
.range-label { flex: 0 0 60px; font-weight: 600; font-size: .88rem; color: var(--muted); }
.range-val { font-size: .85rem; color: var(--muted); min-width: 58px; text-align: end; }

canvas.waveform { width: 100%; height: 92px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); margin-bottom: 16px; display: block; }

.progress-bar { height: 6px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin: 16px 0; }
.progress-bar .fill { height: 100%; width: 0%; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); transition: width .2s ease; }

.status-msg { font-size: .9rem; color: var(--muted); margin-top: 14px; min-height: 18px; }
.status-msg.error { color: #d32f4a; }
.status-msg.ok { color: var(--ok); }
.status-msg.note { margin-top: 0; margin-bottom: 14px; }

audio { width: 100%; margin: 18px 0 0; height: 40px; }

/* --- Pages légales --- */
.legal { max-width: 780px; margin: 0 auto 40px; padding: 44px 48px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; font-size: .97rem; }
.legal h1 { font-size: 2.3rem; font-weight: 800; margin-bottom: .2em; }
.legal h2 { font-size: 1.2rem; font-weight: 700; margin: 2em 0 .55em; }
.legal p { margin: 0 0 1em; }
.legal ul { margin: 0 0 1em; padding-left: 1.3em; list-style: disc; }
.legal li { margin-bottom: .4em; }
.legal-date { color: var(--muted); font-size: .9rem; }
.legal-summary { margin: 22px 0 8px; padding: 16px 20px; background: var(--brand-soft); border-radius: 14px; }
.legal dl { display: grid; grid-template-columns: 190px 1fr; gap: 8px 16px; margin: 0 0 1em; }
.legal dt { font-weight: 600; }
.legal dd { margin: 0; overflow-wrap: anywhere; }
.legal-table { overflow-x: auto; margin-bottom: 1em; }
.legal table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.legal th, .legal td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.legal code { font-size: .86em; }

/* --- Erreur --- */
.empty { text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px; max-width: 520px; margin: 0 auto; box-shadow: var(--shadow); }

/* --- Footer --- */
.site-footer { margin-top: 24px; color: var(--foot-text); }
.footer-wave { display: block; width: 100%; height: 90px; margin-bottom: -1px; }
.footer-wave .w1 { fill: var(--foot-1); }
.footer-wave .w2 { fill: var(--foot-2); }
.footer-body { padding: 18px 0 22px; background: var(--foot-bg); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-grid h3 { font-size: .95rem; margin-bottom: .75em; letter-spacing: 0; }
.footer-grid a:not(.brand) { display: block; color: var(--foot-text); font-size: .9rem; padding: .16rem 0; }
.footer-brand .brand, .footer-brand .brand-mark, .footer-brand .brand-accent { color: var(--foot-text); }
.footer-brand p { margin: .5rem 0 .9rem; font-size: .9rem; }
.socials { display: flex; gap: 8px; }
.socials a:not(.brand) { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.34); }
.footer-bottom { margin-top: 18px; padding-top: 14px; font-size: .82rem; border-top: 1px solid rgba(44,40,87,.2); }
html[data-theme="dark"] .socials a:not(.brand) { background: rgba(255,255,255,.1); }
html[data-theme="dark"] .footer-bottom { border-top-color: rgba(255,255,255,.14); }

/* --- Message "bientôt disponible" --- */
.toast {
    position: fixed; left: 50%; bottom: 26px; z-index: 40; transform: translate(-50%, 16px);
    padding: .6rem 1.1rem; border-radius: 999px; background: #15162c; color: #fff;
    font-size: .88rem; font-weight: 600; opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --- Responsive --- */
@media (max-width: 1320px) {
    .nav { gap: 14px; }
    .nav-panel { gap: 10px; }
    .nav-links { gap: 0; }
    .nav-links > a, .nav-drop > summary { padding: .42rem .55rem; font-size: .86rem; }
    .nav-actions { gap: 6px; }
    .nav-actions .btn-sm { padding: .5rem .75rem; font-size: .84rem; }
}
@media (max-width: 1120px) {
    .icon-btn.nav-toggle { display: inline-grid; }
    .nav-panel {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; padding: 12px 24px 20px;
        max-height: calc(100vh - 72px); overflow-y: auto;
        background: var(--card); border-top: 1px solid var(--border); box-shadow: var(--shadow);
    }
    .site-header.open .nav-panel { display: flex; }
    .nav-links { flex-direction: column; align-items: stretch; }
    .nav-actions { flex-wrap: wrap; }
    .nav-drop .drop-menu { position: static; width: auto; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 8px; }
    html[dir="rtl"] .nav-drop .drop-menu { padding: 0 8px 0 0; }
    .lang-drop[open] { flex-basis: 100%; order: 5; }
    .lang-drop .drop-menu { position: static; width: auto; box-shadow: none; }
}
@media (max-width: 960px) {
    .hero-grid, .rec-card { grid-template-columns: 1fr; }
    .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
    .quick-grid { grid-template-columns: repeat(4, 1fr); }
    .rec-card, html[dir="rtl"] .rec-card { padding: 28px; gap: 28px; }
    .steps { grid-template-columns: 1fr; gap: 10px; }
    .step-arrow { justify-self: center; transform: rotate(90deg); }
    html[dir="rtl"] .step-arrow { transform: rotate(90deg); }
    .benefit-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .container { padding: 0 16px; }
    .brand { font-size: 1.1rem; }
    .hero { padding-top: 32px; }
    .hero-cta .btn { width: 100%; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .rec-card, html[dir="rtl"] .rec-card { padding: 18px 14px; }
    .rec-panel { padding: 20px 14px; }
    .page-head h1 { font-size: 1.8rem; }
    .workspace { padding: 24px 18px; }
    .counter { font-size: 2.1rem; }
    .legal { padding: 26px 20px; }
    .legal h1 { font-size: 1.8rem; }
    .legal dl { grid-template-columns: 1fr; gap: 2px; }
    .legal dd { margin-bottom: 10px; }
    .benefit-grid, .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* L'interlettrage négatif casse les écritures liées ou à signes empilés. */
html[lang="ar"] *, html[lang="th"] * { letter-spacing: 0 !important; }

/* --- RTL (arabe) --- */
html[dir="rtl"] .range-val { text-align: start; }
html[dir="rtl"] .file-list li { flex-direction: row-reverse; }
