/* ═══════════════════════════════════════════════════════════════════════
   Jeu-concours « Les Minions au cinéma avec KFC » — charte graphique KFC
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Polices de marque KFC (chemins relatifs : css/ → fonts/) ─────────── */
@font-face {
  font-family: 'National2condensed';
  src: url('../fonts/National2Condensed-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'National2condensed';
  src: url('../fonts/National2Condensed-Bold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'National2';
  src: url('../fonts/National2-Bold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Palette KFC ─────────────────────────────────────────────────────── */
:root {
  --crimson: #e4042d;
  --crimson-dk: #b8001f;
  --black: #000;
  --dark: #0d0d0e;
  --white: #fff;
  --offwhite: #f4f4f5;
  --border: #cfcfcf;
  --grey: #7e8990;
  --yellow: #ffcd00; --yellow-dk: #f2b705;
  --shadow: 1px 1px 6px rgba(126,137,144,.45);
  --success: #15803d; --success-bg: #f0fdf4; --success-border: #86efac;
  --display: 'National2condensed', 'Segoe UI', Arial, sans-serif;
  --body: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }  /* l'attribut hidden doit toujours l'emporter */
html { scroll-behavior: smooth; }
body { font-family: var(--body); background: var(--white); color: #1a1a1a; min-height: 100vh; }

h1, h2, legend, .btn, button, th, .stat .num, .stat .lbl,
.topbar h1, .navbar-title { font-family: var(--display); }

/* ══ Bande noire (haut) ══════════════════════════════════════════════ */
.topb { background: var(--black); display: flex; justify-content: center;
        align-items: center; min-height: 50px; padding: 10px 20px; }
.topb-inner { display: flex; align-items: center; justify-content: center; gap: 14px;
              flex-wrap: wrap; max-width: 1000px; width: 100%; }
.topb-text { color: var(--white); font-family: var(--display); font-size: 1.05rem;
             letter-spacing: .5px; text-align: center; }
.topb-badge { background: var(--crimson); color: var(--white); font-family: var(--display);
              font-size: .72rem; font-weight: 700; text-transform: uppercase;
              letter-spacing: 1.5px; padding: 4px 12px; border-radius: 3px; }

/* ══ Navbar blanche (sticky) ════════════════════════════════════════ */
.navbar { background: var(--white); padding: 10px 20px; display: flex; align-items: center;
          justify-content: center; border-bottom: 1px solid var(--border);
          position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.navbar-inner { display: flex; align-items: center; gap: 16px; max-width: 1000px;
                width: 100%; justify-content: center; }
.top-logo { width: 62px; height: auto; flex-shrink: 0; }
.navbar-divider { width: 1px; height: 38px; background: var(--border); }
.navbar-title { font-weight: 700; font-size: 1.15rem; text-transform: uppercase;
                letter-spacing: 1px; color: var(--black); line-height: 1.1; }
.navbar-title span { display: block; font-size: .7rem; font-weight: 400; color: var(--grey);
                     text-transform: none; letter-spacing: 0; }

/* ══ Hero rouge ══════════════════════════════════════════════════════ */
.hero { background: radial-gradient(125% 85% at 50% 10%, #3a0a12 0%, #14060a 55%, #0a0a0b 100%);
        position: relative; overflow: hidden; padding: 56px 20px 62px; text-align: center; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-ic { position: absolute; bottom: -50px; font-size: 2rem; opacity: .16;
           animation: floatUp linear infinite; user-select: none; }
.hero-ic:nth-child(1)  { left: 5%;  animation-duration: 17s; animation-delay: 0s;  font-size: 1.4rem; }
.hero-ic:nth-child(2)  { left: 14%; animation-duration: 22s; animation-delay: 4s;  font-size: 1.9rem; }
.hero-ic:nth-child(3)  { left: 23%; animation-duration: 16s; animation-delay: 9s;  font-size: 1.1rem; }
.hero-ic:nth-child(4)  { left: 33%; animation-duration: 24s; animation-delay: 2s;  font-size: 2.4rem; }
.hero-ic:nth-child(5)  { left: 42%; animation-duration: 19s; animation-delay: 7s;  font-size: 1.3rem; }
.hero-ic:nth-child(6)  { left: 51%; animation-duration: 21s; animation-delay: 12s; font-size: 1.7rem; }
.hero-ic:nth-child(7)  { left: 60%; animation-duration: 18s; animation-delay: 3s;  font-size: 1.1rem; }
.hero-ic:nth-child(8)  { left: 69%; animation-duration: 23s; animation-delay: 8s;  font-size: 2.2rem; }
.hero-ic:nth-child(9)  { left: 78%; animation-duration: 16s; animation-delay: 5s;  font-size: 1.4rem; }
.hero-ic:nth-child(10) { left: 86%; animation-duration: 25s; animation-delay: 11s; font-size: 1.8rem; }
.hero-ic:nth-child(11) { left: 93%; animation-duration: 20s; animation-delay: 1s;  font-size: 1.1rem; }
.hero-ic:nth-child(12) { left: 97%; animation-duration: 22s; animation-delay: 6s;  font-size: 1.5rem; }
@keyframes floatUp {
  0%   { transform: translate(0, 0) rotate(0deg) scale(.9); opacity: 0; }
  10%  { opacity: .22; }
  50%  { transform: translate(18px, -55vh) rotate(180deg) scale(1.06); }
  90%  { opacity: .12; }
  100% { transform: translate(-12px, -115vh) rotate(360deg) scale(.9); opacity: 0; }
}
/* Halo lumineux pulsant — profondeur du hero */
.hero::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 20%, rgba(255,205,0,.24), transparent 66%);
  animation: heroGlow 7s ease-in-out infinite; }
@keyframes heroGlow { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.hero-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.hero-label { display: inline-block; background: var(--yellow); color: #000;
              font-family: var(--display); font-size: .78rem; font-weight: 700;
              letter-spacing: 2.5px; text-transform: uppercase; padding: 5px 18px;
              border-radius: 3px; margin-bottom: 18px; }
.hero-title { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 9vw, 4rem);
              text-transform: uppercase; color: var(--white); line-height: .95;
              letter-spacing: 1px; margin-bottom: 14px; }
.hero-subtitle { font-family: var(--display); font-size: clamp(1.05rem, 3.2vw, 1.35rem);
                 color: rgba(255,255,255,.9); letter-spacing: .5px; margin-bottom: 22px; }
.hero-info { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-info span { background: rgba(255,255,255,.12); color: var(--white); font-family: var(--display);
                  font-size: .85rem; letter-spacing: .5px; padding: 7px 14px; border-radius: 3px; }

/* ══ Section + carte formulaire ═════════════════════════════════════ */
.form-section { background: var(--offwhite); padding: 40px 20px 56px; display: flex; justify-content: center; }
.form-card { background: var(--white); box-shadow: var(--shadow); width: 100%; max-width: 520px;
             padding: 30px 26px; border-radius: 4px; }
.form-card-title { font-weight: 700; font-size: 1.4rem; text-transform: uppercase; letter-spacing: .5px;
                   color: var(--black); margin-bottom: 20px; padding-bottom: 14px;
                   border-bottom: 2px solid var(--crimson); }

/* ── Champs ─────────────────────────────────────────────────────────── */
label { display: block; font-weight: 600; margin: 14px 0 4px; font-size: .9rem; }
/* Libellés des champs — style exemple : condensé, MAJUSCULES, gras, gris, interlettré */
.field-label { font-family: var(--display); display: block; font-size: .8rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: #586066; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=tel], input[type=file], select {
  width: 100%; padding: 11px 14px; border: 1.5px solid #a8a8a8; border-radius: 0;
  font-size: 1rem; color: #111; -webkit-appearance: none; }
input:focus, select:focus { outline: none; border-color: var(--crimson); }
select { cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%23555' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.row { display: flex; gap: 12px; }
.row .col { flex: 1; min-width: 0; }
@media (max-width: 360px) { .row { flex-direction: column; gap: 0; } }
fieldset { min-width: 0; border: 1px solid #ddd; border-radius: 6px; margin: 16px 0 0; padding: 10px 14px; }
fieldset legend { font-weight: 700; font-size: .95rem; padding: 0 4px; text-transform: uppercase; }
ul.errorlist { color: var(--crimson-dk); list-style: none; padding: 0; margin: 4px 0; font-size: .85rem; }
.help { color: #777; font-size: .8rem; margin: 2px 0 8px; }
.help a { color: var(--crimson-dk); }
.requis { color: var(--crimson); font-weight: 700; }
.checkboxes { margin-top: 18px; }
.checkboxes label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.checkboxes input { width: 19px; height: 19px; margin-top: 1px; flex-shrink: 0; accent-color: var(--crimson); }
.lien-reglement { white-space: nowrap; color: var(--crimson-dk); font-weight: 600; text-decoration: underline; }
/* Champ photo : bouton personnalisé + confirmation verte */
.file-field input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; padding: 0; border: 0; }
.file-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  cursor: pointer; padding: 12px 16px; border: 1.5px dashed #a8a8a8; background: #fafafa; color: #333; font-size: .95rem; }
.file-btn:hover { border-color: var(--crimson); color: var(--crimson-dk); }
.photo-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-actions .file-btn { flex: 1 1 140px; width: auto; }
.file-ok { display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  border: 1.5px solid var(--success-border); background: var(--success-bg); color: var(--success); font-size: .9rem; }
.file-check { font-weight: 700; }
.file-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-modifier { background: none; border: none; padding: 0; font: inherit; color: var(--crimson-dk); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: underline; }
#form-container button[type=submit] { margin-top: 22px; width: 100%; padding: 15px; border: none;
  border-radius: 4px; background: var(--crimson); color: var(--white); font-size: 1.1rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px; cursor: pointer;
  transition: background-color .18s; }
#form-container button[type=submit]:hover { background: var(--crimson-dk); }
.succes { text-align: center; padding: 16px 0; }
.succes h2 { color: var(--success); border: none; }
.message { text-align: center; padding: 24px 0; color: #555; line-height: 1.5; }

/* ══ Footer sombre ═══════════════════════════════════════════════════ */
.site-footer { background: var(--dark); padding: 30px 20px; text-align: center; }
.footer-logo { width: 48px; height: auto; margin-bottom: 12px; opacity: .6; }
.footer-text { font-family: var(--display); font-size: .8rem; color: #ababab; letter-spacing: .5px; }
.footer-text a { color: #ababab; text-decoration: none; }
.footer-text a:hover { color: var(--white); }

/* ══ Boutons (espace de gestion) ════════════════════════════════════ */
.btn { display: inline-block; padding: 9px 16px; border: none; border-radius: 6px;
       background: var(--crimson); color: var(--white); font-weight: 700; text-transform: uppercase;
       letter-spacing: .5px; text-decoration: none; cursor: pointer; font-size: .85rem;
       transition: background-color .15s; }
.btn:hover { background: var(--crimson-dk); }
.btn-dark { background: #222; } .btn-dark:hover { background: #000; }
.btn-outline { background: var(--white); border: 1.5px solid var(--border); color: #333; }
.btn-outline:hover { border-color: #999; }
.btn-valide { background: var(--success); color: var(--white); }
.btn-valide:hover { background: #166534; }
.sous-titre { font-size: .95rem; margin: 26px 0 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--success); }
.sous-titre:first-child { margin-top: 0; }
.sous-titre-neutre { color: #1a1a1a; }

/* ══ Espace de gestion ═══════════════════════════════════════════════ */
.topbar { background: var(--black); color: var(--white); display: flex; align-items: center;
          justify-content: space-between; padding: 10px 20px; gap: 10px; flex-wrap: wrap; }
.topbar .brand { display: flex; align-items: center; gap: 12px; }
.topbar .brand img { width: 46px; height: auto; }
.topbar h1 { font-size: 1rem; margin: 0; text-transform: uppercase; letter-spacing: .5px; }
.topbar .actions { display: flex; gap: 8px; align-items: center; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
/* Toasts : notifications qui s'effacent toutes seules au bout de ~4s */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { padding: 13px 18px; border-radius: 8px; color: #fff; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.28);
         animation: toastIn .25s ease, toastOut .4s ease 4s forwards; }
.toast.success { background: var(--success); }
.toast.info { background: #1d4ed8; }
.toast.warning { background: #b45309; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(16px); visibility: hidden; } }

/* Lightbox : aperçu de la photo d'un ticket depuis la gestion */
.photo-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 1100;
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.photo-modal img { max-width: 95%; max-height: 90vh; border-radius: 6px; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.photo-modal .fermer { position: absolute; top: 12px; right: 22px; background: none; border: none;
  color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--white); border-radius: 8px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.stat .num { font-size: 2.2rem; font-weight: 700; color: var(--crimson); line-height: 1; }
.stat .num.countdown { font-size: 1.45rem; line-height: 2.2rem; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: #777; margin-top: 6px; }
h2 { font-size: 1.05rem; margin: 26px 0 12px; text-transform: uppercase; letter-spacing: .3px; }
.search { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.search input { flex: 1; min-width: 200px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; }
.table-wrap { overflow-x: auto; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
table { width: 100%; border-collapse: collapse; background: var(--white); font-size: .86rem; }
thead th { background: var(--black); color: var(--white); text-align: left; padding: 12px 14px;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; white-space: nowrap;
  border-bottom: 2px solid var(--crimson); }
tbody td { padding: 11px 14px; border-top: 1px solid #f0f0f0; vertical-align: middle; color: #333; }
tbody tr:first-child td { border-top: none; }
tbody tr:nth-child(even) td { background: #fbfafa; }
tbody tr:hover td { background: #fff1f3; }
tbody td a { color: var(--crimson-dk); font-weight: 600; }
/* Coloration des lignes selon le statut (placée après zèbre/survol pour primer) */
tbody tr.row-valide td { background: #f1faf2; }
tbody tr.row-gagnant td { background: #fff7e0; }
tbody tr.row-valide td:first-child { background: linear-gradient(to right, var(--success) 3px, #f1faf2 3px); }
tbody tr.row-gagnant td:first-child { background: linear-gradient(to right, #d4af37 3px, #fff7e0 3px); }
.pagination { margin-top: 14px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.card-block { background: var(--white); border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.muted { color: #888; }
form.inline { display: inline; }
.badge-dup { color: #b45309; font-weight: 700; cursor: pointer; text-decoration: underline; white-space: nowrap; }
.retour-tirage { margin-top: 18px; }
tbody tr.row-focus td { animation: focusFlash 2s ease; }
@keyframes focusFlash { from { background: #ffcd00; } }
.doublons-note { margin: 0 0 14px; font-size: .85rem; color: #8a6d3b; }
.doublons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.homonyme-groupe { background: #fff; border: 1px solid #eee; border-radius: 6px; padding: 10px 12px; font-size: .88rem; }
.homonyme-groupe ul { list-style: none; margin: 6px 0 10px; padding: 0; }
.homonyme-groupe li { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 5px 0; }
.dup-mail { font-size: .82rem; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-mini { padding: 4px 9px; font-size: .72rem; }
.groupe-action { margin-top: 10px; border-top: 1px dashed #e5e5e5; padding-top: 10px; }
/* Onglets du dashboard (CSS pur, sans JS) */
.tabs > input[type=radio] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tabs-nav { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid var(--border); margin-bottom: 22px; }
.tabs-nav label { cursor: pointer; padding: 10px 18px; font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; font-size: .9rem; color: var(--grey);
  border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs-nav label:hover { color: var(--black); }
.tab-panel { display: none; }
#tab-participants:checked ~ #panel-participants,
#tab-tirage:checked ~ #panel-tirage,
#tab-parametres:checked ~ #panel-parametres { display: block; }
#tab-participants:checked ~ .tabs-nav label[for="tab-participants"],
#tab-tirage:checked ~ .tabs-nav label[for="tab-tirage"],
#tab-parametres:checked ~ .tabs-nav label[for="tab-parametres"] { color: var(--crimson); border-bottom-color: var(--crimson); }

/* Onglet Paramètres */
.param-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .param-dates { grid-template-columns: 1fr; } }
.param-suspension { margin-top: 18px; }
.parametres-form input[type=text] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 4px; font-size: 1rem; }
.date-heure { display: flex; gap: 8px; }
.date-heure input { flex: 1; min-width: 0; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 4px; font-size: 1rem; }
.parametres-form .checkbox-param { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 600; font-size: .9rem; color: #333; }
.parametres-form .checkbox-param input { accent-color: var(--crimson); }
.parametres-form button { margin-top: 18px; }

/* ══ Connexion ═══════════════════════════════════════════════════════ */
.login-page { background: var(--black); display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.login { background: var(--white); border-radius: 10px; padding: 28px; width: 340px; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.login .logo { display: block; width: 70px; margin: 0 auto 14px; }
.login h1 { font-size: 1.1rem; margin: 0 0 18px; text-align: center; }
.login input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; }
.login input:focus { outline: none; border-color: var(--crimson); }
.login button { width: 100%; margin-top: 20px; padding: 12px; font-size: 1rem; border: none;
                border-radius: 6px; background: var(--crimson); color: var(--white); font-weight: 700; cursor: pointer; }
.login button:hover { background: var(--crimson-dk); }
.login .err { color: var(--crimson-dk); font-size: .85rem; margin-top: 10px; text-align: center; }

/* ══ Responsive ══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .form-card { padding: 22px 16px; }
  .hero { padding: 30px 16px 40px; }
  .topb-inner { flex-direction: column; gap: 6px; }
}

/* (Les maquettes d'aperçu — diagonale / cinéma / split — ont été retirées :
    on conserve la page actuelle avec l'animation de hero enrichie ci-dessus.) */

/* ── Modal de confirmation (récap avant inscription) ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 6px; max-width: 440px; width: 100%; padding: 24px 22px; }
.modal h2 { font-size: 1.25rem; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .3px; }
.modal-sub { color: #555; font-size: .9rem; margin: 0 0 16px; }
.recap-ligne { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0;
  border-bottom: 1px solid #eee; font-size: .92rem; }
.recap-ligne span { color: #777; }
.recap-ligne strong { text-align: right; word-break: break-word; }
.recap-apercu { display: block; max-width: 100%; max-height: 220px; margin: 12px auto 0;
  border: 1px solid var(--border); border-radius: 4px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn-modal-oui { padding: 13px; border: none; border-radius: 4px; background: var(--crimson);
  color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; text-transform: uppercase;
  letter-spacing: .5px; font-family: var(--display); }
.btn-modal-oui:hover { background: var(--crimson-dk); }
.btn-modal-secondaire { padding: 12px; border: 1.5px solid var(--border); border-radius: 4px;
  background: #fff; color: #333; font-weight: 600; font-size: .95rem; cursor: pointer; }
.btn-modal-secondaire:hover { border-color: #999; }
