/* ============================================================
   style.css — Thème Casino pour le vote Bal de Promo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Josefin+Sans:wght@300;400&display=swap');

/* ---- Variables ---- */
:root {
  --gold:      #C9A84C;
  --gold-lt:   #E8C97A;
  --gold-dk:   #8B6914;
  --red:       #9B2335;
  --red-lt:    #C0392B;
  --dark:      #0D0D0D;
  --dark-2:    #161616;
  --dark-3:    #1E1E1E;
  --dark-4:    #2A2A2A;
  --cream:     #F5EDD5;
  --cream-lt:  #FBF6E9;
  --text:      #E8DEC8;
  --text-dim:  #9A8F78;
  --radius:    6px;
  --shadow:    0 4px 24px rgba(0,0,0,.7);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--dark);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 24px,
      rgba(201,168,76,.03) 24px,
      rgba(201,168,76,.03) 25px
    ),
    radial-gradient(ellipse at 20% 10%, rgba(155,35,53,.15) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(201,168,76,.1)  0%, transparent 55%);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ---- Particules décoratives ---- */
.casino-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.casino-particles .suit {
  position: absolute;
  font-size: 2rem;
  opacity: .4;
  animation: floatSuit 20s linear infinite;
  color: var(--gold);
}
.casino-particles .suit:nth-child(1) { left:  5%; animation-delay:  0s; font-size: 3rem; }
.casino-particles .suit:nth-child(2) { left: 20%; animation-delay:  -5s; color: var(--red); }
.casino-particles .suit:nth-child(3) { left: 70%; animation-delay:  -9s; }
.casino-particles .suit:nth-child(4) { left: 88%; animation-delay: -15s; font-size: 2.5rem; color: var(--red); }
.casino-particles .chip {
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 6px solid rgba(201,168,76,.08);
  animation: floatChip 25s linear infinite;
}
.casino-particles .chip:nth-child(5)  { left: 30%; animation-delay:  -3s; }
.casino-particles .chip:nth-child(6)  { left: 55%; animation-delay: -12s; border-color: rgba(155,35,53,.06); }
.casino-particles .chip:nth-child(7)  { left: 78%; animation-delay: -20s; }

.casino-particles .suit:nth-child(8) { left:  38%; animation-delay:  -2s; font-size: 3rem; color: var(--red); }
.casino-particles .suit:nth-child(9) { left: 62%; animation-delay:  -7s; }
.casino-particles .suit:nth-child(10) { left: 12%; animation-delay:  -18s; color: var(--red); }
.casino-particles .suit:nth-child(11) { left: 45%; animation-delay: -10s; font-size: 2.5rem; }

.casino-particles .chip:nth-child(12)  { left: 15%; animation-delay:  -6s; }
.casino-particles .chip:nth-child(13)  { left: 48%; animation-delay: -14s; border-color: rgba(155,35,53,.06); }
.casino-particles .chip:nth-child(14)  { left: 92%; animation-delay: -2s; }

@keyframes floatSuit {
  0%   { transform: translateY(110vh) rotate(0deg);   opacity: 0; }
  10%  { opacity: .1; }
  90%  { opacity: .1; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}
@keyframes floatChip {
  0%   { transform: translateY(110vh); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh); opacity: 0; }
}

/* ---- Header ---- */
.site-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
  border-bottom: 1px solid rgba(201,168,76,.2);
  background: linear-gradient(180deg, rgba(201,168,76,.06) 0%, transparent 100%);
}
.header-deco {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 98px,
    rgba(201,168,76,.05) 98px,
    rgba(201,168,76,.05) 100px
  );
  pointer-events: none;
}
.lycee-name {
  font-family: 'Josefin Sans', sans-serif;
  font-size: .78rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.crown-icon {
  font-size: 3.5rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(201,168,76,.5);
  animation: crownPulse 3s ease-in-out infinite;
}
@keyframes crownPulse {
  0%,100% { text-shadow: 0 0 30px rgba(201,168,76,.5); }
  50%      { text-shadow: 0 0 60px rgba(201,168,76,.8), 0 0 120px rgba(201,168,76,.3); }
}
.site-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--gold-lt);
  letter-spacing: .04em;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  margin: .3rem 0 .5rem;
}
.subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-dim);
  letter-spacing: .05em;
}
.suits-row {
  margin-top: .8rem;
  letter-spacing: .6em;
  color: var(--gold);
  opacity: .5;
  font-size: 1rem;
}

/* ---- Main ---- */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ---- Status cards ---- */
.status-card {
  max-width: 560px;
  margin: 4rem auto;
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  text-align: center;
  background: var(--dark-2);
  border: 1px solid rgba(201,168,76,.2);
  box-shadow: var(--shadow);
}
.status-card .status-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}
.status-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  color: var(--gold-lt);
  margin-bottom: .8rem;
}
.status-card p { color: var(--text-dim); }
.status-voted .status-icon { color: var(--gold); }
.vote-time { font-size: .85rem; margin-top: .5rem; }

/* ---- Countdown ---- */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.countdown-bloc {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown-bloc span {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
}
.countdown-bloc em { font-size: .7rem; color: var(--text-dim); letter-spacing: .1em; }
.countdown-sep { font-size: 2rem; color: var(--gold); line-height: 1; margin-bottom: 1.2rem; }

/* ---- Identification ---- */
.identification-section {
  max-width: 560px;
  margin: 0 auto;
  background: var(--dark-2);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.ident-header { text-align: center; margin-bottom: 2rem; }
.ident-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--gold-lt);
  margin-bottom: .5rem;
}
.ident-header p { color: var(--text-dim); font-size: .95rem; }
.ident-form .form-row { margin-bottom: 1.4rem; }
.ident-form label {
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}
.ident-form select,
.ident-form input[type="date"] {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--dark-3);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.ident-form select:focus,
.ident-form input:focus { border-color: var(--gold); }
.ident-form select option { background: var(--dark-3); }

/* ---- Boutons ---- */
.btn-secondary, .btn-vote {
  display: block;
  width: 100%;
  padding: .9rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: 'Josefin Sans', sans-serif;
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: all .2s;
}
.btn-secondary {
  background: linear-gradient(135deg, var(--dark-4), var(--dark-3));
  color: var(--gold);
  border: 1px solid rgba(201,168,76,.3);
  margin-top: .5rem;
}
.btn-secondary:hover {
  background: linear-gradient(135deg, var(--dark-3), var(--dark-4));
  border-color: var(--gold);
}
.btn-vote {
  background: linear-gradient(135deg, var(--gold-dk), var(--gold), var(--gold-dk));
  color: var(--dark);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .18em;
  padding: 1.1rem 2rem;
  box-shadow: 0 4px 20px rgba(201,168,76,.3);
  max-width: 420px;
  margin: 0 auto;
}
.btn-vote:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,168,76,.5);
}
.btn-vote .btn-icon { margin: 0 .5rem; }
.btn-link {
  color: var(--text-dim);
  font-size: .85rem;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
}
.btn-link:hover { color: var(--gold); }

/* ---- Liste votants ---- */
.liste-votants { margin-top: 1.5rem; }
.liste-label {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .8rem;
  font-family: 'Josefin Sans', sans-serif;
}
.votant-item {
  padding: .8rem 1rem;
  background: var(--dark-3);
  border: 1px solid rgba(201,168,76,.15);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.votant-item:hover { border-color: var(--gold); background: var(--dark-4); }
.votant-item .vi-name { flex: 1; }
.votant-item .vi-classe { color: var(--text-dim); font-size: .9rem; }
.votant-item .vi-badge {
  font-size: .75rem;
  padding: .2rem .5rem;
  border-radius: 2px;
  background: rgba(155,35,53,.3);
  color: #e88;
  border: 1px solid rgba(155,35,53,.4);
}
.votant-item .vi-badge.ok { background: rgba(26,92,52,.3); color: #8e8; border-color: rgba(26,92,52,.4); }
.ident-error {
  padding: .8rem 1rem;
  background: rgba(155,35,53,.15);
  border: 1px solid rgba(155,35,53,.3);
  border-radius: var(--radius);
  color: #e88;
  font-size: .9rem;
  margin-top: .8rem;
}
.hidden { display: none !important; }

/* ---- Section vote ---- */
.identified-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 1rem;
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  font-size: .9rem;
  color: var(--gold);
}

.vote-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 720px) {
  .vote-columns { grid-template-columns: 1fr; gap: 2rem; }
}
.vote-col-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(201,168,76,.15);
}
.vote-col-header .crown {
  display: block;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: .4rem;
}
.vote-col-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--gold-lt);
}

/* ---- Cartes candidats ---- */
.candidats-grid { display: flex; flex-direction: column; gap: .7rem; }
.candidat-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.candidat-card { cursor: pointer; }
.card-inner {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem 1rem;
  background: var(--dark-2);
  border: 1px solid rgba(201,168,76,.15);
  border-radius: var(--radius);
  transition: all .18s;
  position: relative;
}
.candidat-card:hover .card-inner { border-color: rgba(201,168,76,.4); background: var(--dark-3); }
.candidat-card input:checked + .card-inner {
  border-color: var(--gold);
  background: rgba(201,168,76,.08);
  box-shadow: 0 0 0 2px rgba(201,168,76,.2), inset 0 0 20px rgba(201,168,76,.05);
}
.card-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dark-4), var(--dark-3));
  border: 1px solid rgba(201,168,76,.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: .95rem;
  color: var(--gold);
  flex-shrink: 0;
}
.card-photo { width: 44px; height: 44px; flex-shrink: 0; }
.card-photo img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(201,168,76,.3); }
.card-info { flex: 1; }
.card-info strong { display: block; color: var(--cream); font-size: 1rem; }
.card-info span { color: var(--text-dim); font-size: .85rem; }
.card-check {
  color: var(--gold);
  opacity: 0;
  font-size: 1.2rem;
  transition: opacity .15s;
}
.candidat-card input:checked + .card-inner .card-check { opacity: 1; }

/* ---- Submit ---- */
.fermeture-info {
  text-align: center;
  color: var(--text-dim);
  font-size: .9rem;
  margin-bottom: 1.2rem;
  font-style: italic;
}
.vote-submit-area { text-align: center; }
.vote-notice {
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  font-style: italic;
}

/* ---- Résultats ---- */
.resultats-section { text-align: center; }
.resultats-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--gold-lt);
  margin-bottom: 3rem;
  text-shadow: 0 0 30px rgba(201,168,76,.3);
}
.winners-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.winner-card {
  background: var(--dark-2);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 280px;
  box-shadow: var(--shadow), 0 0 60px rgba(201,168,76,.05);
  animation: fadeInUp .8s ease both;
}
.winner-card:nth-child(2) { animation-delay: .3s; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.winner-badge {
  font-family: 'Josefin Sans', sans-serif;
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.winner-avatar, .winner-photo {
  width: 90px; height: 90px;
  border-radius: 50%;
  margin: 0 auto 1.2rem;
  display: block;
  border: 2px solid var(--gold);
}
.winner-avatar {
  background: linear-gradient(135deg, var(--dark-4), var(--dark-3));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--gold);
}
.winner-photo { object-fit: cover; }
.winner-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: .3rem;
}
.winner-card p { color: var(--text-dim); font-size: .9rem; margin-bottom: 1rem; }
.winner-votes {
  font-family: 'Josefin Sans', sans-serif;
  font-size: .8rem;
  letter-spacing: .1em;
  color: var(--gold);
  border-top: 1px solid rgba(201,168,76,.2);
  padding-top: .8rem;
}

/* ---- Footer ---- */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(201,168,76,0.1); /* Ta bordure dorée subtile */
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Conteneur pour aligner les 3 blocs sur grand écran */
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-school-logo img {
  height: 70px; /* Ajuste selon ton logo */
  width: auto;
  opacity: 0.8;
}

.site-footer .suits-row { 
  margin-bottom: 0.5rem; 
  letter-spacing: 5px;
}

.footer-credits {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.7;
}

.footer-credits img {
  height: 50px; /* Ton logo d'entreprise plus discret */
  filter: grayscale(1) brightness(1.5); /* Optionnel : pour qu'il s'intègre mieux */
}

/* Version Desktop : on aligne tout sur une seule ligne */
@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .footer-school-logo, .footer-credits {
    flex: 1;
  }
  
  .footer-school-logo { text-align: left; }
  .footer-credits { text-align: right; align-items: flex-end; }
}

/* ============================================================
   Barre de recherche candidats
   ============================================================ */

.candidat-search-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.candidat-search-input {
  flex: 1;
  min-width: 140px;
  padding: .55rem .9rem;
  background: var(--dark-3);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}
.candidat-search-input:focus {
  border-color: var(--gold);
}
.candidat-search-input::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.candidat-search-classe {
  padding: .55rem .8rem;
  background: var(--dark-3);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  cursor: pointer;
}
.candidat-search-classe:focus {
  border-color: var(--gold);
}
.candidat-search-classe option {
  background: var(--dark-3);
}

.candidat-search-count {
  font-family: 'Josefin Sans', sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--gold);
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

/* Carte cachée par la recherche */
.candidat-card.search-hidden {
  display: none;
}

.search-wrapper {
    position: relative;
    display: inline-block;
}

.search-wrapper i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-lt);
}

.search-wrapper input {
    padding-left: 35px; /* Laisse de la place pour l'icône */
}