:root {
    --bg: #f8f9fc;
    --surface: #ffffff;
    --surface-2: #f1f3f9;
    --text: #10162f;
    --muted: #646d81;
    --line: #e8ecf3;
    --primary: #FF7F00;
    --primary-strong: #e67300;
    --primary-soft: rgba(255, 127, 0, 0.1);
    --primary-glow: rgba(255, 127, 0, 0.15);
    --primary-gradient: linear-gradient(135deg, #FF7F00, #ff9a33);
    --primary-gradient-2: linear-gradient(135deg, #FF7F00, #ffb366);
    --shadow-sm: 0 4px 12px rgba(16, 22, 47, 0.05);
    --shadow-md: 0 8px 24px rgba(16, 22, 47, 0.08);
    --shadow-lg: 0 16px 40px rgba(16, 22, 47, 0.1);
    --shadow-xl: 0 24px 60px rgba(16, 22, 47, 0.12);
    --radius: 20px;
    --radius-sm: 14px;
    --radius-xs: 10px;
    --container: 1180px;
    --font: 'Poppins', sans-serif;
    --header-height: 64px;
    --transition-fast: 180ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d1319;
    --surface: #131b24;
    --surface-2: #19222d;
    --text: #eef4fb;
    --muted: #a8b5c7;
    --line: rgba(166, 181, 199, 0.15);
    --primary: #FF7F00;
    --primary-strong: #ff9433;
    --primary-soft: rgba(255, 127, 0, 0.12);
    --primary-glow: rgba(255, 127, 0, 0.2);
    --primary-gradient: linear-gradient(135deg, #FF7F00, #ff9a33);
    --primary-gradient-2: linear-gradient(135deg, #FF7F00, #ffb366);
    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.42);
    --shadow-xl: 0 40px 80px rgba(0, 0, 0, 0.5);
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 127, 0, 0.05), transparent 35%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    line-height: 1.6;
    transition: background 240ms ease, color 240ms ease;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0 45%, rgba(255, 255, 255, 0.18) 50%, transparent 55%) no-repeat;
    background-size: 260% 100%;
    opacity: 0.16;
    animation: pageShimmer 18s ease-in-out infinite;
    z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

::selection {
    background: var(--primary);
    color: #fff;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 999px;
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

.container {
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
}

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.page-section { padding: 2rem 0 4rem; position: relative; }
#modele { scroll-margin-top: 96px; }

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.section-eyebrow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    animation: shimmerSweep 4s ease-in-out infinite;
}

@keyframes shimmerSweep {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.section-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text) 30%, var(--primary) 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    margin: 0.7rem 0 0;
    color: var(--muted);
    max-width: 760px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.section-heading {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1.6rem;
}

.section-heading .section-eyebrow { width: fit-content; }

#modele .section-heading {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
}

#modele .section-heading .section-eyebrow {
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   BOUTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 16px 30px rgba(255, 127, 0, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 40px rgba(255, 127, 0, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 127, 0, 0.3);
}

.btn-secondary {
    background: #fff;
    color: var(--primary);
    border-color: rgba(255, 127, 0, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 127, 0, 0.34);
    background: rgba(255, 127, 0, 0.05);
    box-shadow: 0 8px 20px rgba(255, 127, 0, 0.12);
}

html[data-theme="dark"] .btn-secondary {
    background: rgba(19, 27, 36, 0.92);
    color: var(--text);
    border-color: var(--line);
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.28) 50%, transparent 75%);
    transform: translateX(-120%);
    transition: transform 500ms ease;
}

.btn:hover::after { transform: translateX(120%); }

/* ========================================
   HEADER
   ======================================== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background:
        linear-gradient(110deg, rgba(255, 127, 0, 0.04), transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid rgba(221, 227, 241, 0.5);
    box-shadow: 0 10px 24px rgba(16, 22, 47, 0.03);
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.main-header.scrolled {
    box-shadow: 0 10px 30px rgba(16, 22, 47, 0.08);
    border-bottom-color: rgba(255, 127, 0, 0.12);
}

html[data-theme="dark"] .main-header {
    background:
        linear-gradient(110deg, rgba(255, 127, 0, 0.06), transparent 46%),
        linear-gradient(180deg, rgba(18, 26, 35, 0.85), rgba(13, 19, 25, 0.8));
    border-bottom-color: rgba(166, 181, 199, 0.08);
}

html[data-theme="dark"] .main-header.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(255, 127, 0, 0.1);
}

.main-header .container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.7rem 0;
    min-height: var(--header-height);
    width: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    position: relative;
}

.brand-link::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 12px;
    background: var(--primary-soft);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.brand-link:hover::after {
    opacity: 1;
}

.brand-link > * {
    position: relative;
    z-index: 1;
}

.brand img { height: 32px; transition: transform var(--transition-fast); }
.brand-link:hover img { transform: scale(1.05); }

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.7rem;
    box-shadow: 0 10px 20px rgba(255, 127, 0, 0.28);
    animation: badgePulse 5.5s ease-in-out infinite;
}

html[data-theme="dark"] .brand-mark {
    box-shadow: 0 10px 20px rgba(255, 127, 0, 0.2);
}

/* Navigation desktop */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Cache le toggle mobile par défaut (desktop) */
.theme-toggle-mobile { display: none; }

.main-nav a {
    position: relative;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.3rem 0;
    transition: color var(--transition-fast);
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--primary-soft);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.theme-toggle:hover::before {
    opacity: 1;
}

.theme-toggle:hover {
    transform: translateY(-1px) scale(1.05);
    border-color: rgba(255, 127, 0, 0.28);
    box-shadow: 0 4px 14px rgba(255, 127, 0, 0.1);
}

.theme-toggle.theme-toggle-mobile { display: none; }

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.header-icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--primary-soft);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.header-icon-btn:hover::before {
    opacity: 1;
}

.header-icon-btn.header-menu-btn { display: none; }
.header-icon-btn.is-hidden { display: none; }

.header-icon-btn:hover {
    transform: translateY(-1px) scale(1.05);
    border-color: rgba(255, 127, 0, 0.28);
    box-shadow: 0 4px 14px rgba(255, 127, 0, 0.1);
}

.header-icon-btn svg { width: 18px; height: 18px; position: relative; z-index: 1; }

@media (max-width: 720px) {
    .main-header .container {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    .header-top-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.48rem 0;
        width: 100%;
        min-height: 52px;
        position: relative;
        z-index: 52;
    }
    .brand {
        flex: 1;
        gap: 0.5rem;
    }
    .brand-link { min-width: 0; }
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        flex-shrink: 0;
    }
    .header-icon-btn.header-menu-btn { display: inline-flex; }
    
    /* Navigation mobile : dropdown qui couvre toute la largeur */
    .main-nav {
        display: none;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        padding: 0.35rem 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 51;
        background:
            linear-gradient(110deg, rgba(255, 127, 0, 0.04), transparent 46%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
        backdrop-filter: blur(20px) saturate(1.5);
        -webkit-backdrop-filter: blur(20px) saturate(1.5);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 8px 16px rgba(16, 22, 47, 0.06);
        border-radius: 0;
        width: 100vw;
        margin-left: calc(-1 * (100vw - 100%) / 2);
    }
    
    html[data-theme="dark"] .main-nav {
        background:
            linear-gradient(110deg, rgba(255, 127, 0, 0.06), transparent 46%),
            linear-gradient(180deg, rgba(18, 26, 35, 0.98), rgba(13, 19, 25, 0.95));
        border-bottom-color: rgba(166, 181, 199, 0.08);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }
    
    .main-header.menu-open .main-nav { display: flex; }
    
    .main-nav a {
        display: inline-flex;
        width: auto;
        padding: 0.25rem 0.5rem;
        border-radius: 6px;
        background: transparent;
        border: none;
        text-align: center;
        font-size: 0.72rem;
        font-weight: 600;
        transition: background var(--transition-fast), color var(--transition-fast);
        white-space: nowrap;
    }
    .main-nav a::after { display: none; }
    .main-nav a.active,
    .main-nav a:hover {
        background: var(--primary-soft);
        color: var(--primary);
    }
    .theme-toggle,
    .header-icon-btn { width: 36px; height: 36px; flex-shrink: 0; }
    .theme-toggle.theme-toggle-mobile {
        display: inline-flex;
        width: auto;
        height: auto;
        min-height: 0;
        padding: 0.2rem 0.45rem;
        justify-content: center;
        border-radius: 6px;
        gap: 0.3rem;
        margin-top: 0;
        margin-left: 0.15rem;
        font-size: 0.72rem;
        border: none;
        background: transparent;
        flex-shrink: 0;
    }
    .theme-toggle.theme-toggle-mobile:hover {
        background: var(--primary-soft);
    }
    .theme-toggle:not(.theme-toggle-mobile) { display: none; }
}

@media (max-width: 480px) {
    .main-header .container { gap: 0.3rem; }
    .brand-link span { font-size: 0.95rem; }
    .brand-link img { height: 26px; }
    .brand { gap: 0.4rem; }
    .main-nav a { font-size: 0.78rem; padding: 0.4rem 0.65rem; }
}

.theme-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    position: relative;
    z-index: 1;
}

html[data-theme="dark"] .theme-icon-dark { display: none; }
html:not([data-theme="dark"]) .theme-icon-light { display: none; }

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    padding: 3rem 0 4.5rem;
    background:
        radial-gradient(ellipse 80% 50% at 0% 50%, rgba(255, 127, 0, 0.06), transparent),
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(255, 127, 0, 0.04), transparent),
        linear-gradient(110deg, rgba(255, 127, 0, 0.08), transparent 46%),
        linear-gradient(180deg, #f9faff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

html[data-theme="dark"] .hero,
html[data-theme="dark"] .page-hero {
    background:
        radial-gradient(ellipse 80% 50% at 0% 50%, rgba(255, 127, 0, 0.08), transparent),
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(255, 127, 0, 0.06), transparent),
        linear-gradient(110deg, rgba(255, 127, 0, 0.08), transparent 46%),
        linear-gradient(180deg, #121a23 0%, #0d1319 100%);
}

.page-hero { padding: 2rem 0 0.6rem; }
.page-hero .hero-grid { align-items: end; }

.page-hero .hero-copy {
    max-width: 860px;
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(221, 227, 241, 0.8);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .page-hero .hero-copy,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .editor-sidebar,
html[data-theme="dark"] .editor-form section,
html[data-theme="dark"] .editor-preview,
html[data-theme="dark"] .footer {
    background: linear-gradient(180deg, rgba(19, 27, 36, 0.98), rgba(16, 22, 31, 0.98));
    border-color: var(--line);
}

html[data-theme="dark"] .template-preview {
    background:
        linear-gradient(135deg, rgba(255, 127, 0, 0.18), transparent),
        linear-gradient(180deg, #131b24 0%, #18212c 100%);
}

html[data-theme="dark"] .template-preview::after {
    border-color: rgba(166, 181, 199, 0.16);
    background:
        linear-gradient(180deg, rgba(20, 28, 39, 0.94), rgba(20, 28, 39, 0.82));
}

html[data-theme="dark"] .preview-canvas {
    background: linear-gradient(180deg, #131b24 0%, #101823 100%);
}

html[data-theme="dark"] .editor-field,
html[data-theme="dark"] .editor-textarea,
html[data-theme="dark"] .editor-select,
html[data-theme="dark"] .searchbar input {
    background: rgba(19, 27, 36, 0.94);
    color: var(--text);
    border-color: var(--line);
}

/* Effets décoratifs hero */
.hero::after {
    content: '';
    position: absolute;
    inset: auto -10% 0 auto;
    width: min(48vw, 640px);
    height: 280px;
    background: radial-gradient(circle, rgba(255, 127, 0, 0.12), transparent 68%);
    filter: blur(8px);
    pointer-events: none;
    animation: drift 12s ease-in-out infinite alternate;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -10% auto auto -8%;
    width: min(30vw, 400px);
    height: 300px;
    background: radial-gradient(circle, rgba(255, 127, 0, 0.05), transparent 68%);
    filter: blur(10px);
    pointer-events: none;
    animation: drift 15s ease-in-out infinite alternate-reverse;
}

/* Particules décoratives */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.hero-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.15;
    animation: particleFloat 20s ease-in-out infinite;
}

.hero-particle:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; animation-duration: 18s; }
.hero-particle:nth-child(2) { top: 60%; left: 5%; animation-delay: 2s; animation-duration: 22s; width: 4px; height: 4px; }
.hero-particle:nth-child(3) { top: 30%; right: 15%; animation-delay: 4s; animation-duration: 20s; width: 8px; height: 8px; opacity: 0.1; }
.hero-particle:nth-child(4) { top: 70%; right: 8%; animation-delay: 6s; animation-duration: 16s; width: 5px; height: 5px; }
.hero-particle:nth-child(5) { top: 20%; left: 50%; animation-delay: 8s; animation-duration: 24s; width: 3px; height: 3px; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.15; }
    25% { transform: translateY(-30px) translateX(15px) scale(1.2); opacity: 0.25; }
    50% { transform: translateY(-10px) translateX(-10px) scale(0.9); opacity: 0.1; }
    75% { transform: translateY(-40px) translateX(5px) scale(1.1); opacity: 0.2; }
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 1.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-copy { max-width: 760px; }

.hero-copy h1 {
    margin: 0.7rem 0 0;
    font-size: clamp(2.7rem, 5vw, 4.5rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    background: linear-gradient(135deg, var(--text) 45%, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-copy p {
    max-width: 660px;
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-size: 1.1rem;
    animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 100ms both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 200ms both;
}

.home-hero {
    min-height: 48vh;
    display: grid;
    place-items: center;
}

.home-hero .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 620px) minmax(250px, 340px);
    justify-content: center;
    text-align: left;
    gap: clamp(0.85rem, 1.8vw, 1.5rem);
}

.home-hero .hero-copy { max-width: 860px; }

.home-hero .hero-copy h1 {
    font-size: clamp(3rem, 5vw, 4.8rem);
    max-width: 14ch;
    margin-top: 0;
    background: linear-gradient(135deg, var(--text) 30%, var(--primary) 65%, #ffa64d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero .hero-copy p {
    max-width: 56ch;
    font-size: 1.12rem;
}

.home-hero .hero-actions { margin-top: 1.4rem; }

.default-template-preview {
    position: relative;
    justify-self: start;
    width: min(100%, 340px);
    padding: 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 127, 0, 0.18);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-lg);
    transform: rotate(1.5deg);
    transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
    animation: cvFloat 6s ease-in-out infinite;
    overflow: hidden;
}

.default-template-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.78);
    pointer-events: none;
}

.default-template-preview::after {
    content: '';
    position: absolute;
    inset: -20% auto -20% -55%;
    width: 44%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-18deg);
    animation: cvShine 5.5s ease-in-out infinite;
    pointer-events: none;
}

.default-template-preview:hover {
    transform: translateY(-8px) rotate(0deg) scale(1.015);
    border-color: rgba(255, 127, 0, 0.3);
    box-shadow: var(--shadow-xl);
}

.default-template-preview img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 127, 0, 0.14);
    background: var(--bg);
    box-shadow: 0 18px 38px rgba(16, 22, 47, 0.1);
    transition: transform 260ms ease, filter 260ms ease;
}

.default-template-preview:hover img {
    transform: scale(1.018);
    filter: saturate(1.06) contrast(1.02);
}

.panel {
    padding: 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.grid-2, .grid-3, .grid-4 { display: grid; gap: 0.85rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    padding: 1.15rem;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
    border: 1px solid rgba(255, 127, 0, 0.12);
    box-shadow: 0 14px 34px rgba(16, 22, 47, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.95;
}

.card h3 { margin: 0 0 0.45rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); }

/* ========================================
   TEMPLATE GALLERY
   ======================================== */
.template-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding-top: 0.35rem;
}

.template-card {
    display: grid;
    gap: 0;
    padding: 0;
    width: 100%;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
    border: 1px solid rgba(255, 127, 0, 0.14);
    box-shadow: 0 16px 36px rgba(16, 22, 47, 0.07);
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 400ms ease, border-color 300ms ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.template-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(255, 127, 0, 0.03));
    opacity: 0;
    transition: opacity 400ms ease;
    z-index: 0;
    pointer-events: none;
}

.template-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.template-card:hover::after { transform: scaleX(1); }
.template-card:hover::before { opacity: 1; }

.template-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(255, 127, 0, 0.3);
    z-index: 5;
    animation: badgePulse 3s ease-in-out infinite;
}

.template-card.featured {
    border-color: rgba(255, 127, 0, 0.25);
    box-shadow: 0 18px 42px rgba(255, 127, 0, 0.12);
}

.template-card.featured:hover {
    box-shadow: 0 28px 60px rgba(255, 127, 0, 0.2);
}

.template-shot {
    width: 100%;
    display: block;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 0;
    background: var(--surface-2);
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 400ms ease;
    position: relative;
    z-index: 1;
}

.template-card:hover .template-shot {
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.03);
}

.template-shot-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.template-shot-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(16, 22, 47, 0.04));
    pointer-events: none;
    z-index: 2;
}

.template-card:hover .template-shot-wrapper::after {
    background: linear-gradient(180deg, transparent 40%, rgba(255, 127, 0, 0.08));
}

.template-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 22, 47, 0.5);
    opacity: 0;
    transition: opacity 350ms ease;
    z-index: 5;
    backdrop-filter: blur(2px);
}

.template-card:hover .template-overlay,
.template-card:focus-within .template-overlay { opacity: 1; }

.template-card-footer {
    padding: 0.7rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.98));
}

.template-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-action {
    min-height: 40px;
    padding: 0.55rem 1.1rem;
    font-size: 0.78rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(255, 127, 0, 0.25);
    opacity: 0;
    transform: translateY(12px) scale(0.92);
    pointer-events: none;
    transition: opacity 350ms ease, transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 350ms ease;
}

.template-card:hover .template-action,
.template-card:focus-within .template-action {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.template-action.btn-primary:hover {
    transform: translateY(0) scale(1.06);
    box-shadow: 0 12px 28px rgba(255, 127, 0, 0.35);
}

.template-preview {
    height: 180px;
    margin-bottom: 0.75rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 127, 0, 0.12), transparent),
        linear-gradient(180deg, #ffffff 0%, #fff8f0 100%);
    position: relative;
}

.template-preview::before {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 12px;
    background:
        linear-gradient(90deg, transparent 0 28%, rgba(255, 127, 0, 0.08) 35%, transparent 42%) no-repeat,
        linear-gradient(180deg, transparent 0 24%, rgba(255, 127, 0, 0.08) 26%, transparent 31%) no-repeat;
    background-size: 220% 100%, 100% 220%;
    animation: previewSweep 7s ease-in-out infinite;
    opacity: 0.9;
    z-index: 1;
}

.template-preview::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 127, 0, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76));
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 54px rgba(16, 22, 47, 0.12);
    border-color: rgba(255, 127, 0, 0.28);
}

html[data-theme="dark"] .card {
    background: linear-gradient(180deg, rgba(19, 27, 36, 0.98), rgba(16, 22, 31, 0.98));
    border-color: rgba(166, 181, 199, 0.14);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .template-card {
    background: linear-gradient(180deg, rgba(19, 27, 36, 0.98), rgba(16, 22, 31, 0.98));
    border-color: rgba(166, 181, 199, 0.14);
}

html[data-theme="dark"] .template-card::after { background: var(--primary-gradient); }

html[data-theme="dark"] .template-shot {
    border-color: rgba(166, 181, 199, 0.14);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .default-template-preview {
    background: rgba(19, 27, 36, 0.9);
    border-color: rgba(166, 181, 199, 0.16);
}

html[data-theme="dark"] .default-template-preview::before {
    border-color: rgba(166, 181, 199, 0.08);
}

html[data-theme="dark"] .default-template-preview img {
    border-color: rgba(166, 181, 199, 0.16);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.template-gallery .template-card:nth-child(2) { opacity: 0.96; }

/* ========================================
   REVEAL ANIMATIONS
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 700ms ease,
        transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

.page-shell { padding: 1.5rem 0 3.25rem; }

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--line);
    background:
        linear-gradient(110deg, rgba(255, 127, 0, 0.06), transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.98));
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    inset: auto auto 0 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.4;
}

.footer::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 127, 0, 0.06), transparent 70%);
    pointer-events: none;
}

html[data-theme="dark"] .footer {
    background:
        linear-gradient(110deg, rgba(255, 127, 0, 0.06), transparent 46%),
        linear-gradient(180deg, rgba(15, 20, 27, 0.95), rgba(13, 19, 25, 0.98));
    border-top-color: rgba(166, 181, 199, 0.08);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(255, 127, 0, 0.12), transparent 28%),
        linear-gradient(180deg, #121a23 0%, var(--bg) 100%);
}

html[data-theme="dark"] body::before { opacity: 0.06; }

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.footer strong {
    display: block;
    color: var(--text);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.03em;
}

.footer strong::before { content: '✦ '; color: var(--primary); }

.footer p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.footer nav {
    display: flex;
    gap: 1.5rem;
    color: var(--muted);
    font-weight: 600;
}

.footer nav a {
    position: relative;
    padding: 0.2rem 0;
    transition: color 180ms ease;
}

.footer nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 100%;
    height: 1.5px;
    border-radius: 999px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

.footer nav a:hover { color: var(--primary); }
.footer nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.page-hero { padding: 2rem 0 1.1rem; }
.page-hero .hero-copy h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); }

.sidebar {
    position: sticky;
    top: 5.2rem;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.sidebar nav {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.8rem;
}

.sidebar nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 600;
}

.sidebar nav a.active,
.sidebar nav a:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.editor-sidebar,
.editor-form section,
.editor-preview {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 253, 255, 0.96));
}

.editor-field,
.editor-textarea,
.editor-select {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    outline: none;
}

.editor-field:focus,
.editor-textarea:focus,
.editor-select:focus {
    border-color: rgba(255, 127, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 127, 0, 0.1);
}

.editor-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) minmax(320px, 380px);
    gap: 0.85rem;
}

.editor-sidebar,
.editor-form,
.editor-preview {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.editor-sidebar { padding: 0.9rem; }

.section-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.section-list button {
    text-align: left;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
}

.section-list button.active {
    border-color: rgba(255, 127, 0, 0.35);
    background: var(--primary-soft);
    color: var(--primary);
}

.editor-form { padding: 1rem; }

.editor-form section {
    padding: 0.95rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: #fff;
    margin-bottom: 0.85rem;
}

.editor-form h2 { margin: 0 0 0.8rem; font-size: 1.2rem; }

.field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
}

.field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
}

.editor-preview { padding: 1rem; }

.preview-canvas {
    min-height: 920px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

@media (max-width: 1100px) {
    .hero-grid,
    .editor-layout,
    .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .hero-grid,
    .editor-layout,
    .grid-4,
    .grid-3,
    .grid-2 { grid-template-columns: 1fr; }
    .main-header .container { flex-wrap: wrap; }
    .footer-grid { align-items: flex-start; flex-direction: column; }
    .home-hero { text-align: center; }
    .home-hero .hero-grid { text-align: center; }
    .home-hero .hero-copy { margin-left: auto; margin-right: auto; }
    .home-hero .hero-copy h1,
    .home-hero .hero-copy p { margin-left: auto; margin-right: auto; }
    .home-hero .hero-actions { justify-content: center; }
    .default-template-preview {
        justify-self: center;
        width: min(82vw, 300px);
        transform: none;
    }
    .template-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .template-card { border-radius: 18px; }
    .template-shot-wrapper { aspect-ratio: 3 / 4.25; }
}

@media (max-width: 640px) {
    .page-section { padding: 2rem 0 3.5rem; }
    .hero { padding: 2.5rem 0 3.5rem; }
    .home-hero { min-height: auto; padding-top: 2rem; padding-bottom: 1rem; }
    .home-hero .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .home-hero .hero-copy h1 {
        max-width: 100%;
        font-size: clamp(2.05rem, 10vw, 2.8rem);
        line-height: 1.12;
        margin: 0.5rem 0 0;
    }
    .home-hero .hero-copy p { font-size: 1.05rem; margin-top: 1rem; line-height: 1.5; }
    .hero-actions { margin-top: 1.5rem; gap: 0.85rem; }
    .btn { width: 100%; min-height: 50px; }
    .default-template-preview {
        width: min(100%, 280px);
        padding: 0.55rem;
        margin-left: auto;
        margin-right: auto;
    }
    .default-template-preview img { border-radius: 12px; }
    .hero-actions .btn,
    .hero-actions a { width: 100%; }
    .section-heading { margin-bottom: 1.1rem; }
    .section-title { font-size: clamp(1.55rem, 7vw, 2rem); line-height: 1.08; }
    .section-subtitle { font-size: 0.95rem; }
    .template-gallery { grid-template-columns: 1fr; gap: 0.9rem; justify-items: center; }
    .template-card { width: min(100%, 280px); border-radius: 16px; }
    .template-shot-wrapper { aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
    .template-shot {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        object-position: center;
        background: var(--surface-2);
        transform: none !important;
        filter: none !important;
    }
    .template-card .template-overlay {
        opacity: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .template-card .template-action { width: calc(100% - 1.5rem); margin: 0.75rem; }
    .footer-grid { gap: 1rem; }
    .footer-grid nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
    .section-heading { text-align: left; }
    #modele .section-heading .section-eyebrow { margin-left: 0; margin-right: 0; }
}

/* ========================================
   FAQ SECTION — Design amélioré avec animations
   ======================================== */
#faq { scroll-margin-top: 96px; }

#faq .section-heading {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
}

#faq .section-heading .section-eyebrow { margin-left: auto; margin-right: auto; }
#faq .section-heading .section-title { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }

.faq-grid {
    display: grid;
    gap: 0.85rem;
    max-width: 820px;
    margin: 0 auto;
}

/* Carte FAQ */
.faq-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    overflow: hidden;
    transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
    position: relative;
}

.faq-item:hover {
    border-color: rgba(255, 127, 0, 0.2);
    box-shadow: 0 6px 24px rgba(255, 127, 0, 0.08);
    transform: translateY(-2px);
}

.faq-item[open] {
    border-color: rgba(255, 127, 0, 0.25);
    box-shadow: 0 8px 32px rgba(255, 127, 0, 0.1);
    transform: translateY(0);
}

/* Barre de progression orange */
.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.faq-item[open]::before { transform: scaleX(1); }

/* Question */
.faq-question {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    list-style: none;
    -webkit-user-select: none; user-select: none;
    transition: color 300ms ease, background 300ms ease, padding 300ms ease;
    position: relative;
    z-index: 1;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; content: ''; }

.faq-item[open] .faq-question {
    color: var(--primary);
    background: var(--primary-soft);
    padding-bottom: 0.85rem;
}

/* Icône box */
.faq-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--primary-soft);
    color: var(--primary-strong);
    transition: background 300ms ease, transform 300ms ease;
}

.faq-item[open] .faq-icon-box {
    background: var(--primary-strong);
    color: #fff;
    transform: scale(1.05);
}

.faq-icon-box svg {
    width: 16px;
    height: 16px;
    transition: transform 300ms ease;
}

.faq-item[open] .faq-icon-box svg { transform: scale(1.1); }

/* Icône pulse quand fermé */
.faq-item:not([open]) .faq-icon-box svg {
    animation: faqIconPulse 3s ease-in-out infinite;
}

@keyframes faqIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Chevron */
.faq-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-left: auto;
    color: var(--primary);
    transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1), color 300ms ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(90deg);
    color: var(--primary);
}

.faq-chevron svg { width: 14px; height: 14px; }

/* Texte de la question */
.faq-question-text {
    flex: 1;
    min-width: 0;
    transition: color 300ms ease, transform 300ms ease;
}

.faq-item[open] .faq-question-text { transform: translateX(2px); }

/* Compteur */
.faq-question-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.faq-item[open] .faq-question-counter {
    background: var(--primary);
    color: #fff;
}

/* Réponse */
.faq-answer {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.7;
    animation: faqSlideIn 350ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes faqSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Paragraphes dans la réponse */
.faq-answer p {
    margin: 0 0 0.6rem;
    animation: faqFadeIn 500ms ease both;
}

.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer p:nth-child(2) { animation-delay: 80ms; }

@keyframes faqFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Listes dans la réponse */
.faq-answer ul,
.faq-answer ol {
    margin: 0.5rem 0 0.7rem;
    padding-left: 1.4rem;
    animation: faqFadeIn 600ms ease both;
    animation-delay: 40ms;
}

.faq-answer li {
    margin-bottom: 0.4rem;
    position: relative;
    animation: faqListItem 400ms ease both;
}

.faq-answer li::marker { color: var(--primary); }
.faq-answer li:last-child { margin-bottom: 0; }

/* Animation staggered pour les items de liste */
.faq-answer li:nth-child(1) { animation-delay: 50ms; }
.faq-answer li:nth-child(2) { animation-delay: 80ms; }
.faq-answer li:nth-child(3) { animation-delay: 110ms; }
.faq-answer li:nth-child(4) { animation-delay: 140ms; }
.faq-answer li:nth-child(5) { animation-delay: 170ms; }
.faq-answer li:nth-child(6) { animation-delay: 200ms; }
.faq-answer li:nth-child(7) { animation-delay: 230ms; }
.faq-answer li:nth-child(8) { animation-delay: 260ms; }
.faq-answer li:nth-child(9) { animation-delay: 290ms; }
.faq-answer li:nth-child(10) { animation-delay: 320ms; }

@keyframes faqListItem {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

.faq-answer strong { color: var(--text); font-weight: 600; }

/* Numérotation personnalisée des listes ordonnées */
.faq-answer ol li {
    list-style-type: none;
    counter-increment: faq-counter;
    padding-left: 0.5rem;
}

.faq-answer ol { counter-reset: faq-counter; }

.faq-answer ol li::before {
    content: counter(faq-counter) ".";
    color: var(--primary);
    font-weight: 700;
    margin-right: 0.4rem;
}

/* Thème sombre */
html[data-theme="dark"] .faq-item {
    background: linear-gradient(180deg, rgba(19, 27, 36, 0.98), rgba(16, 22, 31, 0.98));
}

html[data-theme="dark"] .faq-item[open] {
    border-color: rgba(255, 127, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .faq-item[open] .faq-question {
    background: rgba(255, 127, 0, 0.1);
}

/* Responsive FAQ */
@media (max-width: 640px) {
    .faq-question { padding: 0.9rem 1rem; font-size: 0.88rem; }
    .faq-answer { padding: 0 1rem 1rem; font-size: 0.83rem; }
    .faq-icon-box { width: 28px; height: 28px; }
    .faq-icon-box svg { width: 14px; height: 14px; }
}

/* ========================================
   ANIMATIONS GLOBALES
   ======================================== */
@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-18px, -10px, 0) scale(1.04); }
}

@keyframes cvFloat {
    0%, 100% { transform: translateY(0) rotate(1.5deg); }
    50% { transform: translateY(-12px) rotate(-0.6deg); }
}

@keyframes cvShine {
    0%, 42% { left: -55%; opacity: 0; }
    52% { opacity: 0.85; }
    68%, 100% { left: 118%; opacity: 0; }
}

@keyframes previewSweep {
    0%, 100% { background-position: -30% 0, 0 -30%; }
    50% { background-position: 120% 0, 0 120%; }
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes pageShimmer {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.loading-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.loading-spinner::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid var(--line);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 600ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   SKELETON LOADING
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   FOCUS VISIBLE
   ======================================== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body::before,
    .hero::after,
    .hero::before,
    .default-template-preview::after,
    .hero-particles { display: none; }
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale { opacity: 1; transform: none; }
}