@font-face {
    font-family: 'Bebas Neue Pro';
    src: url('/assets/fonts/bebas-neue-pro/Bebas Neue Pro Regular.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Bebas Neue Pro';
    src: url('/assets/fonts/bebas-neue-pro/Bebas Neue Pro Bold.otf') format('opentype');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Klarissa';
    src: url('/assets/fonts/klarissa/Klarissa.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

:root {
    --orange: #f7941d;
    --orange-vif: #ff8a00;
    --bleu-nuit: #060a16;
    --bleu-leclerc: #0057a8;
    --blanc: #ffffff;
    --rouge-erreur: #e5484d;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bleu-nuit);
    color: var(--blanc);
    font-family: 'Bebas Neue Pro', 'Arial Narrow', sans-serif;
    letter-spacing: .03em;
}

h1, h2, h3 { font-weight: 700; margin: 0; }

a { color: inherit; }

button { font-family: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- *
 * Page d'inscription
 * ---------------------------------------------------------------- */
.page-inscription {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    padding: 0 24px 24px;
    background-image: url('/assets/img/background.jpg');
    background-size: cover;
    background-position: center top;
}

.page-inscription-contenu {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.inscription-carte {
    width: 100%;
    background: rgba(10, 16, 32, .75);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    padding: 32px 28px 28px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.formulaire-inscription {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.formulaire-inscription label {
    font-size: .95rem;
    margin-top: 6px;
}

.formulaire-inscription input[type="text"],
.formulaire-inscription input[type="email"],
.formulaire-inscription input[type="tel"] {
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .06);
    color: var(--blanc);
    font-size: 1rem;
}

.formulaire-inscription input:focus { outline: 2px solid var(--orange); }

.case-a-cocher {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    font-size: .85rem;
    color: #c9d4e8;
}
.case-a-cocher input { margin-top: 3px; }

.bouton-orange {
    margin-top: 14px;
    padding: 14px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffb24d 0%, var(--orange-vif) 100%);
    color: #2a1400;
    font-size: 1.3rem;
    letter-spacing: .05em;
    box-shadow: 0 8px 20px rgba(255, 138, 0, .35);
}
.bouton-orange:hover { filter: brightness(1.07); }

.message-erreur {
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    background: rgba(229, 72, 77, .15);
    border: 1px solid rgba(229, 72, 77, .5);
    color: #ffb4b6;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .9rem;
}

.inscription-mentions {
    margin-top: 18px;
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    font-size: .78rem;
    color: #92a0ba;
    line-height: 1.4;
}

/* ---------------------------------------------------------------- *
 * Page calendrier
 * ---------------------------------------------------------------- */
.page-calendrier {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 32px;
    background-color: var(--bleu-nuit);
    background-image: url('/assets/img/background.jpg');
    background-size: cover;
    background-position: center top;
}

/* ---------------------------------------------------------------- *
 * Header commun (logo + titre + accroche) — toutes les pages
 * ---------------------------------------------------------------- */
.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px 10px;
    text-align: center;
}

.site-header-logo { max-width: min(90%, 420px); height: auto; }
.site-header-titre { max-width: min(90%, 480px); height: auto; margin-top: 18px; }

.site-header-intro {
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    font-size: clamp(1rem, 0.85rem + 1vw, 1.25rem);
    line-height: 1.5;
    color: #d6e0f0;
    max-width: 460px;
    margin: 18px 0 0;
}

.jours-grille {
    width: 100%;
    max-width: 760px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    padding: 24px 16px;
}

.case {
    position: relative;
    aspect-ratio: 1;
    border: none;
    padding: 0;
    background-image: url('/assets/img/case-orange.png');
    background-size: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10%;
    transition: transform .15s ease;
}

.case--a_jouer:hover { transform: scale(1.06); filter: brightness(1.08); }
.case--a_jouer:active { transform: scale(.97); }

.case--verrouille {
    background-image: url('/assets/img/case-orange.png');
    cursor: default;
}

.case--gagne,
.case--perdu,
.case--rate {
    background-image: url('/assets/img/case-bleu.png');
    cursor: default;
}

.case--rate,
.case--passe {
    opacity: .6;
    cursor: not-allowed;
}

.case-numero {
    font-family: 'Klarissa', 'Bebas Neue Pro', 'Arial Narrow', sans-serif;
    font-size: clamp(30px, 6.5vw, 62px);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}

.case-icone {
    position: absolute;
    right: 6%;
    bottom: 6%;
    width: clamp(16px, 2.6vw, 26px);
    height: clamp(16px, 2.6vw, 26px);
    display: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}
.case--verrouille .case-icone { display: block; }
.case-icone svg { width: 100%; height: 100%; display: block; }

.legende {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin-top: 18px;
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    font-size: .85rem;
    color: #c9d4e8;
}
.legende-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(0.95rem, 0.8rem + 1vw, 1.1rem);
}
.pastille {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}
.pastille--orange { background: var(--orange-vif); }
.pastille--bleue { background: #1577d1; }
.pastille--verrou svg { width: 100%; height: 100%; display: block; }

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 0 16px;
    text-align: center;
}

.site-footer-texte {
    font-family: 'Bebas Neue Pro', 'Arial Narrow', sans-serif;
    font-size: .95rem;
    letter-spacing: .05em;
    color: #c9d4e8;
    margin: 0;
}

.site-footer-logos { max-width: min(100%, 520px); height: auto; }

/* ---------------------------------------------------------------- *
 * Modal de grattage
 * ---------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 12, .82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}
.modal-overlay[hidden] { display: none; }

.carte-a-gratter {
    position: relative;
    width: 425px;
    max-width: 92vw;
    aspect-ratio: 425 / 454;
    touch-action: none;
    user-select: none;
}

.reveal {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    overflow: hidden;
}

.reveal-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reveal-contenu {
    position: absolute;
    left: 8.24%;
    top: 24%;
    width: 83.76%;
    height: 57.7%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.reveal-titre {
    font-size: clamp(22px, 6vw, 30px);
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    margin: 0;
}

.reveal-lot-image {
    max-width: 65%;
    max-height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .4));
}

.reveal-lot-nom {
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    font-weight: 700;
    background: rgba(255, 255, 255, .95);
    color: #0057a8;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: .95rem;
    margin: 0;
}

.zone-continuer {
    position: absolute;
    left: 31.53%;
    top: 85.24%;
    width: 36.47%;
    height: 9.91%;
    background: transparent;
    border: none;
}

.zone-fermer {
    position: absolute;
    left: 92%;
    top: 2.64%;
    width: 5.18%;
    height: 4.63%;
    background: transparent;
    border: none;
    border-radius: 50%;
}

.canvas-grattage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}

.instruction-grattage {
    position: absolute;
    left: 50%;
    bottom: -34px;
    transform: translateX(-50%);
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    font-size: .85rem;
    color: #d6e0f0;
    white-space: nowrap;
}

.toast-erreur {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: rgba(229, 72, 77, .95);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-family: 'Bebas Neue Pro', Arial, sans-serif;
    letter-spacing: normal;
    font-size: .9rem;
    z-index: 200;
    max-width: 90vw;
    text-align: center;
}

@media (max-width: 640px) {
    .jours-grille { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .case-numero { font-weight: 700; }
    .reveal-lot-nom { font-size: .85rem; padding: 7px 14px; }
}
