/* Inter (OFL-1.1, voir ../fonts/LICENSE-Inter.txt) : sous-ensemble latin, hébergé localement (aucun CDN). */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-semibold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-bold.woff") format("woff"); }

/* Fraunces (OFL-1.1, voir ../fonts/LICENSE-Fraunces.txt) : titres latins uniquement. L'arabe utilise la pile système. */
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); }

/* ==========================================================================
   Design Tokens — Plat Immobilier
   Chaque thème définit EXACTEMENT les mêmes variables (vérifié par tests/design_tests.php).
   Les couleurs de texte/fond utilisent des hex pour que le contraste soit mesurable.
   ========================================================================== */

:root {
    /* Espacements */
    --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
    --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem;
    /* Rayons */
    --radius-sm: 10px; --radius-md: 14px; --radius-lg: 22px; --radius-pill: 999px;
    /* Typographie */
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --text-sm: .875rem; --text-md: 1rem; --text-lg: 1.25rem; --text-xl: 1.75rem; --text-2xl: 2.25rem;
    /* Mouvement */
    --ease: cubic-bezier(.2, .8, .2, 1);
    --dur-fast: 120ms; --dur: 200ms; --dur-slow: 320ms;
    /* Effets */
    --blur: 18px;
    --tilt-max: 4deg;
    --touch-min: 44px;
    --sidebar-w: 268px;
}

/* ---------- 1. Crystal Light : blanc nacré, argent, bleu glacier ---------- */
:root,
[data-theme="crystal-light"] {
    color-scheme: light;
    --bg: #eef3fa;
    --bg-grad-a: #ffffff; --bg-grad-b: #dbe8f7;
    --surface-solid: #ffffff;
    --glass-bg: rgba(255, 255, 255, .62);
    --glass-border: rgba(255, 255, 255, .85);
    --glass-highlight: rgba(255, 255, 255, .9);
    --line: #c8d6ea;
    --text: #12203a;
    --text-muted: #52627e;
    --primary: #1d5fd6; --primary-on: #ffffff; --primary-edge: #123f94;
    --success-fill: #0a6b43; --success-on: #ffffff; --success-edge: #064a2e;
    --danger-fill: #b3261e; --danger-on: #ffffff; --danger-edge: #7d1812;
    --success-text: #0a6b43; --danger-text: #b3261e; --warning-text: #8a5a00;
    --accent: #5fb3e6;
    --focus: #1d5fd6;
    --accent-2: #b8893a;
    --shadow-rgb: 20 33 61;
}

/* ---------- 2. Crystal Dark : bleu marine profond, bleu nocturne, cyan ---------- */
[data-theme="crystal-dark"] {
    color-scheme: dark;
    --bg: #0a1224;
    --bg-grad-a: #12203f; --bg-grad-b: #060b17;
    --surface-solid: #121d36;
    --glass-bg: rgba(24, 38, 70, .58);
    --glass-border: rgba(140, 180, 255, .20);
    --glass-highlight: rgba(170, 210, 255, .22);
    --line: #2a3b5e;
    --text: #e8f0fc;
    --text-muted: #a3b5d3;
    --primary: #4cc9f0; --primary-on: #04121f; --primary-edge: #1f8fb0;
    --success-fill: #3fcf8e; --success-on: #03160d; --success-edge: #1f8f5e;
    --danger-fill: #ff7b72; --danger-on: #2a0604; --danger-edge: #b8423b;
    --success-text: #5fd69a; --danger-text: #ff8a80; --warning-text: #ffcb6b;
    --accent: #7dd3fc;
    --focus: #7dd3fc;
    --accent-2: #e0b865;
    --shadow-rgb: 0 0 0;
}

/* ---------- 3. Emerald Luxury : émeraude et touches d'or ---------- */
[data-theme="emerald-luxury"] {
    color-scheme: dark;
    --bg: #071f1a;
    --bg-grad-a: #0e3a30; --bg-grad-b: #04120f;
    --surface-solid: #0f2e27;
    --glass-bg: rgba(16, 58, 48, .58);
    --glass-border: rgba(212, 175, 55, .28);
    --glass-highlight: rgba(240, 215, 130, .20);
    --line: #28564a;
    --text: #eaf5f0;
    --text-muted: #9fc4b6;
    --primary: #d4af37; --primary-on: #1a1405; --primary-edge: #8f741a;
    --success-fill: #2fbf8f; --success-on: #02150e; --success-edge: #1a7f5e;
    --danger-fill: #ff7b72; --danger-on: #2a0604; --danger-edge: #b8423b;
    --success-text: #5fd69a; --danger-text: #ff8f87; --warning-text: #f0c75e;
    --accent: #e6c866;
    --focus: #f0d77f;
    --accent-2: #7fd6b4;
    --shadow-rgb: 0 0 0;
}

/* ---------- 4. Crystal Aurora : violet, indigo, cyan ---------- */
[data-theme="crystal-aurora"] {
    color-scheme: dark;
    --bg: #120d2b;
    --bg-grad-a: #2a1d63; --bg-grad-b: #0a0720;
    --surface-solid: #1b1540;
    --glass-bg: rgba(44, 32, 98, .56);
    --glass-border: rgba(170, 150, 255, .28);
    --glass-highlight: rgba(200, 185, 255, .22);
    --line: #3b3173;
    --text: #efeaff;
    --text-muted: #b9aee3;
    --primary: #8f84ff; --primary-on: #0f0a2a; --primary-edge: #5a4fd1;
    --success-fill: #3fcf8e; --success-on: #03160d; --success-edge: #1f8f5e;
    --danger-fill: #ff7b72; --danger-on: #2a0604; --danger-edge: #b8423b;
    --success-text: #5fd69a; --danger-text: #ff8a80; --warning-text: #ffcb6b;
    --accent: #22d3ee;
    --focus: #67e8f9;
    --accent-2: #f0b8d8;
    --shadow-rgb: 4 0 24;
}

/* ---------- 5. Pearl Luxury : nacre, beige, champagne ---------- */
[data-theme="pearl-luxury"] {
    color-scheme: light;
    --bg: #f6f1e9;
    --bg-grad-a: #fffdf9; --bg-grad-b: #eadfcc;
    --surface-solid: #fffdf9;
    --glass-bg: rgba(255, 252, 245, .66);
    --glass-border: rgba(255, 255, 255, .9);
    --glass-highlight: rgba(255, 255, 255, .95);
    --line: #dccfb8;
    --text: #2b2218;
    --text-muted: #6b5d4c;
    --primary: #8a5a14; --primary-on: #ffffff; --primary-edge: #5c3a08;
    --success-fill: #1f6b43; --success-on: #ffffff; --success-edge: #124a2d;
    --danger-fill: #a8271f; --danger-on: #ffffff; --danger-edge: #741812;
    --success-text: #1f6b43; --danger-text: #a8271f; --warning-text: #7a5200;
    --accent: #d9c3a0;
    --focus: #8a5a14;
    --accent-2: #2f6f6a;
    --shadow-rgb: 60 40 10;
}
