/* =====================================================================
   PASSION POS — THÈME COMMUN (toutes les pages)
   Identité de passion-pos.com, sur fond noir : futuriste et corporate.
   Polices : Plus Jakarta Sans (titres), DM Sans (texte), JetBrains Mono
   (chiffres, étiquettes). Rouge Passion #C8182B.
   Chargé AVANT la feuille propre à chaque page.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@500;600;700&display=swap");

:root {
    /* Fonds */
    --fond: #07080B;
    --barre: rgba(10, 11, 15, 0.78);
    --carte: #101217;
    --carte-2: #171A21;
    --ticket: #0B0D11;
    --champ: #0A0B0F;
    --verre: rgba(20, 22, 29, 0.62);

    /* Lignes */
    --ligne: rgba(255, 255, 255, 0.06);
    --bordure: rgba(255, 255, 255, 0.08);
    --bordure-2: rgba(255, 255, 255, 0.13);

    /* Textes */
    --texte: #F4F5F7;
    --texte-2: #DADDE4;
    --texte-3: #B3B9C5;
    --gris: #8E96A4;
    --gris-2: #6C7482;

    /* Rouge Passion */
    --rouge: #C8182B;
    --rouge-vif: #FF5A6B;
    --rouge-profond: #8E0F1E;
    --rouge-fond: rgba(200, 24, 43, 0.14);
    --rouge-clair: #FF7C8A;
    --degrade-rouge: linear-gradient(180deg, #E0263B 0%, #C8182B 55%, #A5101F 100%);
    --lueur-rouge: 0 14px 30px -12px rgba(200, 24, 43, 0.85);

    /* États */
    --vert: #2FBF84;
    --vert-fond: rgba(14, 159, 98, 0.16);
    --vert-ok: #7EE2B3;
    --vert-ok-fond: rgba(14, 159, 98, 0.18);
    --jaune: #FFC44D;
    --jaune-fond: rgba(255, 196, 77, 0.12);
    --jaune-clair: #FFD98A;
    --orange: #FFB27A;

    /* Typographie */
    --titre: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
    --texte-police: "DM Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    /* Formes et mouvements */
    --rayon: 14px;
    --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
    --ombre: 0 24px 48px -20px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
    background-color: var(--fond);
    color: var(--texte);
    font-family: var(--texte-police);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* Fond technique : grille fine qui s'estompe + halo rouge qui respire */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
body::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
body::after {
    background: radial-gradient(ellipse 55% 40% at 50% -10%, rgba(200, 24, 43, 0.16), transparent 70%);
    animation: pp-respire 8s ease-in-out infinite;
}
body > * { position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--titre); letter-spacing: -0.02em; }

/* Petite étiquette technique en capitales (comme passion-pos.com) */
.surtitre {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rouge-vif);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.surtitre::before { content: ""; width: 18px; height: 1px; background: currentColor; }

/* Reflet qui balaie les boutons principaux au survol / à l'appui */
.brille { position: relative; overflow: hidden; isolation: isolate; }
.brille::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 45%, transparent 60%);
    background-size: 250% 100%;
    background-position: 100% 0;
    pointer-events: none;
}
.brille:hover::after, .brille:focus-visible::after { animation: pp-brille 1.1s var(--ease); }

/* Apparitions */
.apparait { animation: pp-monte 0.7s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms); }

@keyframes pp-respire { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes pp-brille { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@keyframes pp-monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pp-scene { from { opacity: 0; transform: translateY(40px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes pp-fondu { from { opacity: 0; } to { opacity: 1; } }

:focus-visible { outline: 2px solid var(--rouge-vif); outline-offset: 2px; }

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

/* =====================================================================
   Thème clair : activé par le bouton ☀︎ / ☾ (retenu sur l'appareil)
   ===================================================================== */
:root[data-theme="clair"] {
    --fond: #F3F4F6;
    --barre: rgba(255, 255, 255, 0.85);
    --carte: #FFFFFF;
    --carte-2: #F1F2F5;
    --ticket: #FFFFFF;
    --champ: #FFFFFF;
    --verre: rgba(255, 255, 255, 0.85);
    --ligne: rgba(15, 20, 30, 0.06);
    --bordure: rgba(15, 20, 30, 0.1);
    --bordure-2: rgba(15, 20, 30, 0.16);
    --texte: #12151B;
    --texte-2: #2A303C;
    --texte-3: #4A5261;
    --gris: #6B7280;
    --gris-2: #8A92A0;
    --rouge-vif: #C8182B;
    --rouge-clair: #C8182B;
    --rouge-fond: rgba(200, 24, 43, 0.08);
    --vert: #16A36B;
    --vert-fond: rgba(22, 163, 107, 0.1);
    --vert-ok: #0E8F5A;
    --vert-ok-fond: rgba(22, 163, 107, 0.1);
    --jaune: #B7791F;
    --jaune-fond: rgba(245, 170, 30, 0.14);
    --jaune-clair: #9A6A12;
    --orange: #C2570C;
    --ombre: 0 16px 36px -18px rgba(16, 24, 40, 0.25);
    color-scheme: light;
}
:root[data-theme="clair"] body::before {
    background-image:
        linear-gradient(rgba(15, 20, 30, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 20, 30, 0.04) 1px, transparent 1px);
}
:root[data-theme="clair"] body::after { background: radial-gradient(ellipse 55% 40% at 50% -10%, rgba(200, 24, 43, 0.07), transparent 70%); }

/* PIN et code Admin : champ texte masqué (jamais « mot de passe »), pour que le navigateur ne le remplisse
   pas avec un mot de passe enregistré. Sans ce masquage, champ-secret.js le remet en champ mot de passe. */
.champ-secret { -webkit-text-security: disc; text-security: disc; }
.champ-secret.visible { -webkit-text-security: none; text-security: none; }


/* Fenêtre de confirmation dans la page (confirmer.js, gestion et CRM) : comme les fenêtres de la caisse,
   voile flouté, carte, croix en haut à droite ; remplace la fenêtre « confirm » du navigateur */
.confirmation-voile {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(4, 5, 7, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
dialog.confirmation-voile { width: auto; height: auto; max-width: none; max-height: none; margin: 0; border: 0; color: inherit; }
dialog.confirmation-voile::backdrop { background: transparent; }
.confirmation-fenetre {
    position: relative; width: 100%; max-width: 460px; padding: 26px 24px 22px; border-radius: 16px;
    background: #111318; border: 1px solid var(--bordure-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.85);
    color: var(--texte); font-family: var(--texte-police); animation: confirmation-arrive 0.2s var(--ease);
}
.confirmation-fenetre h2 { margin: 0 52px 10px 0; font-family: var(--titre); font-size: 20px; letter-spacing: -0.01em; }
.confirmation-fenetre p { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: var(--texte-2); white-space: pre-line; }   /* une ligne par montant annoncé */
.confirmation-croix {
    position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--texte);
    border: 1px solid var(--bordure-2); background: rgba(255, 255, 255, 0.04);
}
.confirmation-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirmation-boutons button {
    min-height: 48px; padding: 0 16px; border-radius: 11px; cursor: pointer; font: 600 15px var(--texte-police);
    border: 1px solid var(--bordure-2); background: rgba(255, 255, 255, 0.04); color: var(--texte);
}
.confirmation-boutons .confirmation-ok { border-color: transparent; background: var(--degrade-rouge); color: #FFFFFF; }
.confirmation-boutons .confirmation-ok.danger { background: #8E0F1E; }
.confirmation-croix:focus-visible, .confirmation-boutons button:focus-visible { outline: 2px solid var(--rouge-vif); outline-offset: 2px; }
:root[data-theme="clair"] .confirmation-voile { background: rgba(18, 21, 27, 0.45); }
:root[data-theme="clair"] .confirmation-fenetre { background: #FFFFFF; box-shadow: 0 24px 50px -20px rgba(16, 24, 40, 0.35); }
:root[data-theme="clair"] .confirmation-croix, :root[data-theme="clair"] .confirmation-annuler { background: #F3F4F6; }
@keyframes confirmation-arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .confirmation-fenetre { animation: none; } }

/* Pied de page légal des pages publiques (v54) : liens vers les documents, mentions légales */
.pied-legal { max-width: 720px; margin: 24px auto 0; padding: 0 16px; text-align: center; font-size: 12px; line-height: 1.6; color: var(--gris); }
.pied-legal nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-bottom: 6px; }
.pied-legal a { color: var(--texte-2); }
.pied-legal p { margin: 0; }
