/* Poppins Bold (dépôt officiel google/fonts, licence OFL) : auto-hébergée, utilisée avec
   parcimonie pour les titres qu'on veut faire ressortir (ex. étiquette du formulaire d'envoi). */
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/assets/fonts/Poppins-Bold.ttf") format("truetype");
}

:root {
    --navy: #0B2545;
    --navy-dark: #071a33;
    --white: #ffffff;
    --bg: #FAFAFA;
    --surface: var(--white);
    --gray-light: #F5F5F5;
    --text: #1B1F27;
    --text-muted: #5B6472;
    --accent: #2EC4B6;
    --accent-dark: #219488;
    --primary: #1D4ED8;
    --primary-dark: #1E40AF;
    --border: #E2E6EA;
    --danger: #C0392B;
    --gold: #E9B429;
    --gold-dark: #C99418;
    --radius: 10px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    color-scheme: light;
}

/* Mode sombre : "auto" suit prefers-color-scheme (bloc media ci-dessous), tant que rien n'a été
   forcé explicitement via le toggle du footer (attribut data-theme posé par assets/js/theme.js,
   lu dès le <head> pour éviter un flash de mauvais thème). "clair"/"sombre" forcent l'un ou
   l'autre indépendamment de la préférence système. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #050B14;
        --surface: #0E1D33;
        --navy: #F3F6FB;
        --text: #E7ECF5;
        --text-muted: #96A2B5;
        --border: #22344D;
        --gray-light: #16273F;
        --primary: #5B8DEF;
        --primary-dark: #3E6FD1;
        --danger: #E2574A;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #050B14;
    --surface: #0E1D33;
    --navy: #F3F6FB;
    --text: #E7ECF5;
    --text-muted: #96A2B5;
    --border: #22344D;
    --gray-light: #16273F;
    --primary: #5B8DEF;
    --primary-dark: #3E6FD1;
    --danger: #E2574A;
    color-scheme: dark;
}

/* Boutons bleus pleins -> contour transparent en mode sombre (le fond plein bleu vif jurait
   sur le fond marine très sombre) ; teinte plus claire au clic pour le retour tactile. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn:not(.btn-secondary):not(.btn-danger):not(.btn-premium) {
        background: transparent;
        color: var(--primary);
        border: 1.5px solid var(--primary);
        box-shadow: none;
    }

    :root:not([data-theme="light"]) .btn:not(.btn-secondary):not(.btn-danger):not(.btn-premium):hover {
        background: rgba(91, 141, 239, 0.1);
        box-shadow: none;
    }

    :root:not([data-theme="light"]) .btn:not(.btn-secondary):not(.btn-danger):not(.btn-premium):active:not(:disabled) {
        background: rgba(91, 141, 239, 0.2);
        color: #8FB4FF;
        border-color: #8FB4FF;
    }
}

:root[data-theme="dark"] .btn:not(.btn-secondary):not(.btn-danger):not(.btn-premium) {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    box-shadow: none;
}

:root[data-theme="dark"] .btn:not(.btn-secondary):not(.btn-danger):not(.btn-premium):hover {
    background: rgba(91, 141, 239, 0.1);
    box-shadow: none;
}

:root[data-theme="dark"] .btn:not(.btn-secondary):not(.btn-danger):not(.btn-premium):active:not(:disabled) {
    background: rgba(91, 141, 239, 0.2);
    color: #8FB4FF;
    border-color: #8FB4FF;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
}

.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

.icon-lg {
    width: 44px;
    height: 44px;
}

.error-card {
    text-align: center;
}

.error-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.error-icon-wrap .icon {
    width: 34px;
    height: 34px;
}

a {
    color: var(--navy);
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page d'accueil : formulaire compact aligné à gauche, l'espace restant accueille une punchline.
   En dessous de 900px, ça revient à un empilement centré classique. */
.home-layout {
    padding: 0 20px;
}

.home-col {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-punchline {
    display: none;
}

@media (min-width: 900px) {
    .home-layout {
        padding: 0 40px;
        display: flex;
        align-items: center;
        gap: 40px;
    }

    .home-col {
        width: 25%;
        min-width: 340px;
        max-width: 420px;
        margin: 0;
        flex-shrink: 0;
    }

    .home-punchline {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: center;
        padding: 40px;
    }

    .punchline-track {
        position: relative;
        width: 100%;
        max-width: 560px;
        min-height: 280px;
    }

    .punchline-track p {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 16px;
        margin: 0;
        opacity: 0;
        transition: opacity 0.7s ease;
        pointer-events: none;
    }

    .punchline-track p span:last-child {
        font-size: 44px;
        font-weight: 900;
        line-height: 1.25;
        color: var(--navy);
    }

    .punchline-track p.active {
        opacity: 1;
    }

    .punchline-icon-wrap {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--primary);
        color: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .punchline-icon-wrap .icon {
        width: 26px;
        height: 26px;
    }
}

header.site-header {
    background: none;
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}

@media (max-width: 480px) {
    .header-inner {
        padding: 14px 16px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    background: var(--surface);
    padding: 8px 18px 8px 8px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(11, 37, 69, 0.1);
}

.logo img {
    display: block;
    border-radius: 8px;
}

.logo-suffix {
    color: var(--text-muted);
    font-weight: 600;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--surface);
    padding: 8px 20px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(11, 37, 69, 0.1);
}

.site-nav > a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.site-nav > a:hover {
    color: var(--navy);
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px !important;
    border-radius: 999px;
    font-size: 13px !important;
    text-decoration: none;
    transition: background 0.15s ease;
}

.nav-pill .icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.nav-pill-primary {
    background: var(--primary) !important;
    color: var(--white) !important;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.35);
}

.nav-pill-primary:hover {
    background: var(--primary-dark) !important;
}

.nav-pill-secondary {
    background: var(--gray-light) !important;
    color: var(--navy) !important;
}

.nav-pill-secondary:hover {
    background: var(--border) !important;
}

.nav-pill-premium {
    background: var(--gold) !important;
    color: var(--white) !important;
    box-shadow: 0 2px 6px rgba(233, 180, 41, 0.35);
}

.nav-pill-premium:hover {
    background: var(--gold-dark) !important;
}

.nav-toggle {
    display: none;
    background: var(--surface);
    border: none;
    color: var(--navy);
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(11, 37, 69, 0.1);
    cursor: pointer;
}

.nav-toggle svg {
    width: 100%;
    height: 100%;
}

.lang-dropdown {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.lang-toggle:hover {
    color: var(--navy);
}

.lang-toggle svg:first-child {
    width: 20px;
    height: 20px;
}

.lang-chevron {
    width: 12px;
    height: 12px;
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(11, 37, 69, 0.18);
    padding: 6px;
    min-width: 140px;
    z-index: 10;
}

.lang-menu.open {
    display: block;
}

.lang-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

.lang-menu a:hover {
    background: var(--bg);
}

.lang-menu a.active {
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 640px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        background: var(--surface);
        padding: 8px 20px 18px;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 10px 24px rgba(11, 37, 69, 0.15);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav > a {
        padding: 10px 0;
        color: var(--text);
        text-align: center;
    }

    .site-nav > a:hover {
        color: var(--navy);
    }

    .lang-toggle {
        color: var(--text-muted);
    }

    .lang-toggle:hover {
        color: var(--navy);
    }

    .site-nav > a.nav-pill {
        width: auto;
        margin: 4px 0;
    }

    .lang-dropdown {
        width: 100%;
    }

    .lang-menu {
        position: static;
        box-shadow: none;
        background: var(--gray-light);
        margin-top: 4px;
    }

    .lang-menu a {
        color: var(--text);
    }

    .lang-menu a:hover {
        background: var(--border);
    }

    .lang-menu a.active {
        color: var(--primary);
    }
}

main {
    padding: 48px 0 64px;
}

.card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 32px;
    box-shadow: 0 10px 28px rgba(29, 78, 216, 0.3);
    animation: card-fade-in 0.35s ease;
}

.form-tab {
    width: calc(100% - 40px);
    margin: 0 20px -16px;
    padding: 14px 24px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, rgba(29, 78, 216, 1) 84%, rgba(27, 65, 168, 1) 100%);
    border: none;
    text-align: left;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 28px rgba(29, 78, 216, 0.3);
}

.form-tab h1 {
    font-family: "Poppins", var(--font);
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--white);
    display: block;
}

@keyframes card-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

h1 {
    font-size: 26px;
    margin: 0 0 8px;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

h1 .icon {
    color: var(--primary);
    flex-shrink: 0;
}

h2 {
    font-size: 18px;
    margin: 0 0 16px;
    color: var(--navy);
}

p {
    color: var(--text-muted);
}

.trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--accent-dark);
    font-size: 13px;
    text-align: center;
}

.trust-line svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

form .field {
    margin-bottom: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.slug-input-wrap {
    position: relative;
}

.slug-input-wrap input {
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.slug-input-wrap.slug-locked input {
    filter: blur(3px);
    opacity: 0.6;
    background: var(--gray-light);
    pointer-events: none;
    user-select: none;
}

.slug-locked-cta {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.slug-input-wrap.slug-locked .slug-locked-cta {
    display: inline-flex;
}

.slug-status {
    margin: 4px 0 0;
    font-size: 12px;
}

.slug-status-ok {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-dark);
    font-weight: 700;
}

.slug-status-ok .icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.slug-status-taken {
    color: var(--text-muted);
}

.slug-status-taken a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.premium-status-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-dark);
}

.premium-status-badge .icon {
    width: 12px;
    height: 12px;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field-row .field {
    flex: 1;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

label .optional {
    font-weight: 400;
    color: var(--text-muted);
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    vertical-align: middle;
    margin-left: 4px;
}

.badge-premium {
    background: var(--gold);
    color: var(--white);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
textarea {
    width: 100%;
    padding: 10px 4px;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 15px;
    font-family: var(--font);
    background: none;
    color: var(--text);
    transition: background 0.15s ease, border-color 0.15s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-bottom-color: var(--primary);
    background: var(--gray-light);
}

textarea {
    resize: none;
    min-height: 70px;
}

.char-progress {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.char-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.15s ease;
}

.char-count {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.form-bottom-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

.expiration-select {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
}

.expiration-select > .icon:first-child {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.expiration-select select {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font);
    text-overflow: ellipsis;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}

.expiration-select select:focus {
    outline: none;
}

.expiration-select > .icon:last-child {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.more-options-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.more-options-btn:hover {
    background: var(--gray-light);
}

.more-options-btn .icon {
    width: 18px;
    height: 18px;
}

.more-options {
    margin-bottom: 14px;
}

@media (min-width: 900px) {
    .card {
        position: relative;
    }

    .more-options {
        position: absolute;
        top: 0;
        left: 100%;
        z-index: 5;
        width: 380px;
        margin-bottom: 0;
        background: linear-gradient(270deg, var(--surface) 95%, var(--gray-light) 100%);
        border: 1px solid var(--border);
        border-radius: 0 8px 8px 0;
        box-shadow: 12px 0 28px rgba(11, 37, 69, 0.14);
        padding: 24px;
        box-sizing: border-box;
        animation: more-options-in 0.28s ease-out;
    }

    .more-options-title {
        margin: 0 0 16px;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--text-muted);
    }

    .more-options .field label {
        white-space: nowrap;
    }
}

/* Le panneau reste toujours à sa position/largeur finales (pas de translation qui passerait
   par-dessus le formulaire) : on révèle progressivement sa largeur via clip-path, de son bord
   gauche (attaché à la carte) vers la droite, ce qui donne l'effet d'un panneau qui "s'étend"
   plutôt que d'un panneau qui glisse. */
@keyframes more-options-in {
    from { clip-path: inset(0 100% 0 0); opacity: 0; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
}

.premium-hint {
    margin: 12px 0 4px;
    text-align: center;
}

.premium-hint .nav-pill-premium {
    width: 100%;
    justify-content: center;
    padding: 10px 16px !important;
    font-size: 13px !important;
}

.reassurance-flags {
    display: block;
    margin: 10px auto 0;
    max-width: 120px;
    width: 100%;
    height: auto;
    opacity: 0.85;
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.upload-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(29, 78, 216, 0.06);
    border: 1px solid rgba(29, 78, 216, 0.12);
    border-radius: 10px;
    padding: 16px 12px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.upload-btn:hover {
    background: rgba(29, 78, 216, 0.1);
}

.upload-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--primary);
    color: var(--white);
}

.upload-btn-icon .icon {
    width: 16px;
    height: 16px;
}

.upload-btn-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.25;
}

.dropzone {
    border-radius: 8px;
    padding: 0;
    text-align: left;
    color: var(--text-muted);
    margin-bottom: 14px;
    background: none;
    transition: background 0.15s ease, padding 0.15s ease;
}

.dropzone.dragover {
    background: rgba(29, 78, 216, 0.06);
    padding: 10px;
    animation: dropzone-pulse 1.1s ease-out infinite;
}

@keyframes dropzone-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(29, 78, 216, 0); }
}

.dropzone .file-list {
    text-align: left;
    margin: 14px 0 0;
    padding: 0;
    font-size: 13px;
}

.dropzone .file-list li {
    list-style: none;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    overflow: hidden;
    animation: file-item-in 0.25s ease;
}

.dropzone .file-list li span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dropzone .file-list li.removing {
    animation: file-item-out 0.22s ease forwards;
}

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

@keyframes file-item-out {
    from { opacity: 1; max-height: 40px; }
    to { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; transform: translateX(12px); }
}

.dropzone .file-list li a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.15s ease, transform 0.15s ease;
}

.dropzone .file-list li a:hover {
    color: var(--danger);
    transform: scale(1.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.btn {
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 3px 12px rgba(30, 64, 175, 0.3);
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-secondary {
    background: var(--surface);
    color: var(--navy);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--bg);
}

.btn-premium {
    background: var(--gold);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(233, 180, 41, 0.3);
}

.btn-premium:hover {
    background: var(--gold-dark);
    box-shadow: 0 3px 12px rgba(201, 148, 24, 0.35);
}

.upload-overlay {
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 0;
    animation: card-fade-in 0.2s ease;
}

.upload-ring-wrap {
    position: relative;
    width: 150px;
    height: 150px;
}

.upload-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.upload-ring-track {
    fill: none;
    stroke: var(--gray-light);
    stroke-width: 10;
}

.upload-ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.2s ease;
}

.upload-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-ring-percent {
    display: inline-block;
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    transition: transform 0.15s ease;
}

.upload-ring-percent.bump {
    transform: scale(1.15);
}

.upload-keep-open-notice {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    padding: 0 16px;
}

.upload-status-label {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.upload-status-sublabel {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.upload-speed {
    margin: 0;
    min-height: 16px;
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.upload-edit-link {
    margin-top: 4px;
    background: none;
    border: none;
    padding: 4px;
    font-size: 13px;
    font-family: var(--font);
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
}

.minigame-play-btn {
    margin-top: 4px;
}

.minigame-wrap {
    width: 100%;
    max-width: 280px;
    margin: 4px auto 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
}

.minigame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.minigame-header strong {
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.minigame-close-btn {
    background: none;
    border: none;
    padding: 2px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
}

.minigame-close-btn:hover {
    color: var(--danger);
}

.minigame-close-btn .icon {
    width: 14px;
    height: 14px;
}

#minigame-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    background: var(--surface);
    touch-action: none;
    cursor: pointer;
}

.upload-edit-link:hover {
    color: var(--navy);
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.alert-error {
    background: rgba(192, 57, 43, 0.08);
    color: var(--danger);
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.alert-error.alert-info {
    background: rgba(29, 78, 216, 0.06);
    color: var(--primary);
    border: 1px solid rgba(29, 78, 216, 0.18);
}

.link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    word-break: break-all;
    margin-bottom: 20px;
}

.download-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.download-expiry {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.download-expiry-urgent {
    color: var(--danger);
    font-weight: 600;
}

.download-extend-cta {
    padding: 4px 10px !important;
    font-size: 12px !important;
}

.download-expiry .icon {
    width: 14px;
    height: 14px;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}

.file-table td {
    padding: 12px 6px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

.file-table-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    min-width: 0;
}

.file-table-name .icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.file-table-name span {
    overflow-wrap: anywhere;
}

.file-table-size {
    color: var(--text-muted);
    white-space: nowrap;
    text-align: right;
    width: 1%;
}

.file-table-action {
    width: 1%;
    text-align: right;
}

.file-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(29, 78, 216, 0.08);
    color: var(--primary);
    transition: background 0.15s ease;
}

.file-download-link:hover {
    background: rgba(29, 78, 216, 0.15);
}

.file-download-link .icon {
    width: 16px;
    height: 16px;
}

.download-subtitle {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.btn-subtext {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
}

#download-all-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-bottom: 16px;
}

#download-all-btn.btn-downloading {
    background: #C7CCD3;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) #download-all-btn.btn-downloading {
        background: #2C4160;
    }
}

:root[data-theme="dark"] #download-all-btn.btn-downloading {
    background: #2C4160;
}

.btn-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: var(--accent);
    transition: width 0.2s ease;
}

.btn-progress-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.file-view-toggle {
    display: flex;
    gap: 6px;
}

.file-options-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.file-options-btn:hover,
.file-options-btn.active {
    background: var(--gray-light);
    color: var(--navy);
}

.file-options-panel {
    margin: -8px 0 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-options-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-options-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.file-options-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.file-options-row select {
    width: auto;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
}

.file-sort-direction-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
}

.file-sort-direction-btn:hover {
    background: var(--gray-light);
    color: var(--navy);
}

.file-sort-direction-btn .icon {
    transition: transform 0.15s ease;
}

.file-sort-direction-btn[data-direction="desc"] .icon {
    transform: rotate(180deg);
}

body.hide-system-files .is-system-file {
    display: none !important;
}

.file-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.file-view-btn .icon {
    width: 13px;
    height: 13px;
}

.file-view-btn:hover {
    background: var(--gray-light);
}

.file-view-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.file-grid-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.file-grid-card:hover {
    background: var(--gray-light);
    border-color: var(--primary);
}

.file-grid-icon {
    display: flex;
    color: var(--primary);
}

.file-grid-icon .icon {
    width: 40px;
    height: 40px;
}

.file-grid-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}

.file-grid-name {
    font-size: 12px;
    color: var(--text);
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.file-grid-size {
    font-size: 11px;
    color: var(--text-muted);
}

.file-album {
    column-count: 2;
    column-gap: 10px;
    margin-bottom: 8px;
}

.file-album-item {
    display: block;
    break-inside: avoid;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    line-height: 0;
}

.file-album-item img {
    width: 100%;
    display: block;
    transition: transform 0.2s ease;
}

.file-album-item:hover img {
    transform: scale(1.03);
}

.file-album-item-video {
    position: relative;
}

.file-album-item video {
    width: 100%;
    display: block;
    pointer-events: none;
}

.file-album-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 37, 69, 0.55);
    border-radius: 50%;
    color: var(--white);
    pointer-events: none;
}

.file-album-play-icon .icon {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

@media (min-width: 560px) {
    .file-album {
        column-count: 3;
    }
}

@media (min-width: 900px) {
    .file-album {
        column-count: 4;
    }
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 37, 69, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: card-fade-in 0.15s ease;
    touch-action: none;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.15s ease;
    transform-origin: center center;
    touch-action: none;
}

.lightbox-video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    background: #000;
}

.lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: lightbox-spin 0.7s linear infinite;
    display: none;
}

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

.lightbox-close,
.lightbox-download,
.lightbox-nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: background 0.15s ease;
}

.lightbox-close:hover,
.lightbox-download:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.24);
}

.lightbox-close,
.lightbox-download {
    top: 16px;
    width: 40px;
    height: 40px;
}

.lightbox-close {
    right: 16px;
}

.lightbox-download {
    right: 64px;
}

.lightbox-close .icon,
.lightbox-download .icon {
    width: 16px;
    height: 16px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
}

.lightbox-nav .icon {
    width: 18px;
    height: 18px;
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.otp-input {
    letter-spacing: 8px;
    font-size: 22px;
    text-align: center;
}

.otp-boxes {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.resend-row {
    text-align: center;
    margin: 16px 0 0;
}

.resend-btn {
    background: none;
    border: none;
    padding: 4px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.resend-btn:not(:disabled) {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

.resend-btn:disabled {
    cursor: default;
}

.resend-status {
    text-align: center;
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--accent-dark);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-row input {
    width: auto;
}

.checkbox-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.checkbox-row label .icon {
    color: var(--text-muted);
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 34px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--navy);
}

.password-toggle .icon {
    width: 17px;
    height: 17px;
}

.password-toggle .icon-eye-hide {
    display: none;
}

.password-toggle.revealed .icon-eye-show {
    display: none;
}

.password-toggle.revealed .icon-eye-hide {
    display: block;
}

.account-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 480px) {
    .account-page {
        padding: 0 16px;
    }
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill-active {
    background: rgba(46, 196, 182, 0.14);
    color: var(--accent-dark);
}

.status-pill-grace {
    background: rgba(192, 57, 43, 0.1);
    color: var(--danger);
}

.status-pill-expired,
.status-pill-pending_validation {
    background: var(--gray-light);
    color: var(--text-muted);
}

.status-pill-plan {
    background: rgba(233, 180, 41, 0.14);
    color: #9C7212;
}

.account-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.account-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin: 16px 0 20px;
    overflow-x: auto;
}

.account-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.account-tab .icon {
    width: 14px;
    height: 14px;
}

.account-tab:hover {
    color: var(--navy);
}

.account-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.account-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gray-light);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.account-tab.active .account-tab-badge {
    background: var(--primary);
    color: var(--white);
}

.account-table-wrap {
    overflow-x: auto;
}

.admin-subnav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-subnav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.admin-subnav-pill:hover {
    background: var(--gray-light);
}

.admin-subnav-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.admin-range-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-range-pill {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.admin-range-pill:hover {
    background: var(--gray-light);
}

.admin-range-pill.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.admin-chart {
    overflow-x: auto;
    margin-bottom: 8px;
}

.admin-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding: 0 2px;
}

.admin-chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    width: 36px;
    height: 100%;
}

.admin-chart-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
}

.admin-chart-bar {
    width: 100%;
    min-height: 2px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
}

.admin-chart-bar-downloads {
    background: var(--accent);
}

.admin-chart-label {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

.admin-section-title {
    font-size: 18px;
    color: var(--navy);
    margin: 0 0 14px;
}

.admin-section-subtitle {
    font-size: 15px;
    color: var(--navy);
    margin: 28px 0 12px;
}

.admin-search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    max-width: 420px;
}

.admin-search-form input {
    flex: 1;
    min-width: 0;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.admin-stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.admin-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
}

.admin-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-icon .icon {
    width: 14px;
    height: 14px;
}

.btn-icon-delete:hover {
    background: rgba(192, 57, 43, 0.08);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-icon-resend:hover {
    background: rgba(29, 78, 216, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-card:hover,
.contact-card:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(11, 37, 69, 0.08);
    outline: none;
}

.contact-card-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--navy);
}

.contact-card-email {
    font-size: 13px;
    color: var(--text-muted);
}

.contact-card-company {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.recipient-input-wrap {
    position: relative;
}

.recipient-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(11, 37, 69, 0.18);
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.recipient-suggestions::-webkit-scrollbar {
    width: 6px;
}

.recipient-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.recipient-suggestions::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.recipient-suggestion-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.recipient-suggestion-item:last-child {
    border-bottom: none;
}

.recipient-suggestion-item:hover,
.recipient-suggestion-item:focus {
    background: var(--gray-light);
    outline: none;
}

.recipient-suggestion-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.recipient-suggestion-email {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.25);
}

.btn-danger:hover {
    background: #a53225;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 37, 69, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
    animation: card-fade-in 0.15s ease;
}

.modal-dialog {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(11, 37, 69, 0.3);
}

.modal-dialog h2 {
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--navy);
}

.modal-dialog p {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.blog-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 480px) {
    .blog-page {
        padding: 0 16px;
    }
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 700px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 960px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1180px) {
    .blog-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 37, 69, 0.08);
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.16), rgba(29, 78, 216, 0.12));
    color: var(--accent-dark);
}

.blog-card-image .icon {
    width: 28px;
    height: 28px;
    opacity: 0.7;
}

.blog-card-image span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.6;
}

.blog-card-body {
    padding: 16px 18px 18px;
}

.blog-card-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.blog-card h2 {
    margin: 6px 0 6px;
    font-size: 16px;
    line-height: 1.3;
}

.blog-card p {
    margin: 0;
    font-size: 13px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.pagination-status {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.pagination [aria-disabled="true"] {
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 560px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

.blog-article h1 {
    margin-top: 10px;
}

.blog-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    margin-top: 20px;
}

.blog-body h2 {
    margin-top: 32px;
    font-size: 20px;
}

.blog-body p {
    color: var(--text);
    margin: 14px 0;
}

.blog-body ul {
    color: var(--text);
    padding-left: 22px;
}

.blog-body li {
    margin: 6px 0;
}

.blog-body a {
    color: var(--accent-dark);
    font-weight: 600;
}

.blog-cta {
    margin-top: 24px;
    text-align: center;
    background: rgba(46, 196, 182, 0.06);
    border-color: rgba(46, 196, 182, 0.25);
}

.confetti-piece {
    position: fixed;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 9999;
    animation: confetti-fall 1.1s ease-out forwards;
}

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110px) rotate(280deg); opacity: 0; }
}

footer.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
}

.footer-inner {
    width: 100%;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .footer-inner {
        padding: 0 16px;
    }
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

@media (max-width: 480px) {
    .site-footer nav {
        justify-content: center;
    }
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--navy);
}

.theme-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.theme-toggle {
    display: inline-flex;
    background: var(--gray-light);
    border-radius: 999px;
    padding: 3px;
}

.theme-toggle-btn {
    border: none;
    background: none;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.theme-toggle-btn:hover {
    color: var(--navy);
}

.theme-toggle-btn.active {
    background: var(--surface);
    color: var(--navy);
    box-shadow: 0 2px 6px rgba(11, 37, 69, 0.12);
}

.site-footer-credit {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.site-footer-credit a {
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: underline;
}

.site-footer-credit a:hover {
    color: var(--navy);
}

@media (max-width: 480px) {
    .field-row {
        flex-direction: column;
        gap: 0;
    }

    .card {
        padding: 22px;
    }

    .dropzone-actions {
        flex-direction: column;
    }

    .dropzone-actions .btn {
        width: 100%;
    }

    .dropzone {
        padding: 20px 16px;
    }

    h1 {
        font-size: 22px;
    }

    .account-table-wrap table {
        font-size: 13px;
    }
}

.premium-header {
    text-align: center;
    margin-bottom: 24px;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(233, 180, 41, 0.15);
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.premium-badge .icon {
    width: 12px;
    height: 12px;
}

.premium-table-wrap {
    overflow-x: auto;
    margin: 24px 0;
}

.premium-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
}

.premium-table th,
.premium-table td {
    padding: 12px 10px;
    text-align: center;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.premium-table th:first-child,
.premium-table td:first-child {
    text-align: left;
    color: var(--text);
    font-weight: 600;
}

.premium-table th {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.premium-col {
    background: rgba(29, 78, 216, 0.04);
    font-weight: 600;
    color: var(--navy);
}

.consent-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0 4px;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-muted);
    cursor: pointer;
}

.consent-checkbox input {
    width: auto;
    flex-shrink: 0;
    margin-top: 2px;
}

.consent-checkbox a {
    color: var(--primary);
}

.premium-cta-locked {
    opacity: 0.45;
    pointer-events: none;
}

.premium-yes {
    color: var(--accent-dark);
    width: 20px;
    height: 20px;
}

.premium-no {
    color: var(--border);
    width: 16px;
    height: 16px;
}

.premium-plans {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.premium-plan {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.premium-plan-highlight {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.15);
}

.premium-plan-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 14px;
}

.premium-plan-price span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.premium-soon {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

@media (max-width: 480px) {
    .premium-plans {
        flex-direction: column;
    }
}

/* Harmonisation typo : tout le texte en gras du site passe en Poppins Bold (seule graisse
   auto-hébergée pour l'instant) plutôt que la police système. Placé en fin de fichier pour
   gagner sur les quelques règles antérieures qui fixaient encore font-family: var(--font). */
h1, h2,
strong, b,
.logo,
.logo-suffix,
.site-nav > a,
.lang-menu a.active,
.slug-status-ok,
.slug-status-taken a,
.premium-status-badge,
label,
.badge-pill,
.expiration-select select,
.upload-btn-label,
.btn,
.upload-ring-percent,
.account-tab,
.download-subtitle,
.file-view-btn,
.status-pill,
.blog-card-image span,
.blog-card-date,
.blog-body a,
.site-footer-credit a,
.premium-badge,
.premium-table th,
.premium-table td:first-child,
.premium-col,
.premium-plan-price {
    font-family: "Poppins", var(--font);
}

@media (min-width: 900px) {
    .punchline-track p span:last-child {
        font-family: "Poppins", var(--font);
    }
}

/* Le texte "(facultatif)" dans les labels reste volontairement en graisse normale : on évite
   qu'il hérite de Poppins (qui n'existe qu'en Bold ici) et paraisse aussi épais que le label. */
label .optional {
    font-family: var(--font);
}

input.otp-box {
    width: 44px;
    height: 54px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-family: "Poppins", var(--font);
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    background: none;
}

input.otp-box:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--gray-light);
}

.account-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 16px;
}

.account-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gray-light);
    color: var(--primary);
    margin-bottom: 16px;
}

.account-empty-icon .icon {
    width: 28px;
    height: 28px;
}

.account-empty-state p {
    margin: 0 0 20px;
    color: var(--text-muted);
}

.premium-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 16px 24px;
}

.premium-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FCEFC7, #F6DA8C);
    color: var(--gold);
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(233, 180, 41, 0.25);
}

.premium-hero-icon .icon {
    width: 40px;
    height: 40px;
}

.premium-hero-headline {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
}

.premium-hero-headline a {
    color: inherit;
    text-decoration: none;
}

.premium-hero-sub {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--text-muted);
}

.premium-hero-link {
    margin: 10px 0 0;
    font-size: 13px;
}

.premium-hero-link a {
    color: var(--primary);
    text-decoration: underline;
}
