@import url("/static/fonts/fonts.css");

/* Charte Plaisirs & Partages / Château de Croignon (plaisirsetpartages.fr) */
:root {
  --bordeaux: #4a1915;        /* logo, boutons */
  --bordeaux-clair: #642f2b;  /* textes d'accent */
  --or: #dd9a0b;              /* anneau et « & » du logo */
  --or-fonce: #d58300;
  --sable: #b0976d;           /* bandeaux, filets */
  --gris-fond: #f1f1f1;
  --blanc: #ffffff;
  --texte: #1a1a1a;
  --texte-doux: #414141;
  --vert: #2e7d4f;
  --rouge: #b3261e;
  --titre: "Playfair Display", Georgia, "Times New Roman", serif;
  --corps: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --rayon: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--corps);
  color: var(--texte);
  background: var(--gris-fond);
  -webkit-tap-highlight-color: transparent;
}

body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

header {
  text-align: center;
  padding: 16px 16px 14px;
  background: var(--blanc);
  border-bottom: 3px solid var(--sable);
}
header .logo { height: clamp(64px, 18vw, 90px); width: auto; display: block; margin: 0 auto; }
header h1 {
  margin: 10px 0 0;
  font-family: var(--titre);
  font-weight: 400;
  font-size: clamp(1.5rem, 5.5vw, 2.3rem);
  letter-spacing: -.02em;
  color: var(--bordeaux);
}
header p {
  margin: 4px 0 0;
  font-family: var(--titre);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: clamp(.7rem, 2.6vw, .9rem);
  color: var(--sable);
}

/* Coordonnées du château : ligne compacte en haut sur mobile */
.coordonnees {
  font-style: normal;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--texte-doux);
  margin: -6px 0 10px;
}
.coordonnees strong {
  font-family: var(--titre);
  font-weight: 700;
  color: var(--bordeaux);
}
.coordonnees a { color: var(--bordeaux-clair); text-decoration: none; white-space: nowrap; }
.coordonnees a:hover, .coordonnees a:focus { text-decoration: underline; }
.coordonnees .sep { color: var(--sable); }

/* Sur ordinateur : en haut à droite du header (en dessous de 860px, chevaucherait le logo) */
@media (min-width: 860px) {
  header { position: relative; }
  .coordonnees {
    position: absolute;
    top: 14px;
    right: 18px;
    margin: 0;
    text-align: right;
    font-size: .82rem;
  }
  .coordonnees strong { display: block; font-size: 1rem; }
  .coordonnees .adresse, .coordonnees a { display: block; }
  .coordonnees .sep { display: none; }
}

main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Bandeau Agriculture Biologique */
.bio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px auto 0;
  padding: 8px 14px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #cfe3c4;
  border-radius: var(--rayon);
  background: #f4f9f0;
}
.bio img { height: clamp(56px, 16vw, 76px); width: auto; display: block; }
.bio span {
  color: #00852f;
  font-weight: 700;
  font-size: clamp(.9rem, 3.6vw, 1.1rem);
  line-height: 1.2;
  text-align: left;
}

/* Pictogramme 18+ */
.badge-18 {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--rouge);
  color: var(--rouge);
  font-weight: 700;
  font-size: .85rem;
  background: var(--blanc);
}
.majeur {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--blanc);
  border-left: 3px solid var(--rouge);
  border-radius: var(--rayon);
  padding: 10px 14px;
  color: var(--texte);
  font-weight: 500;
  max-width: 460px;
}

footer.prevention {
  background: var(--blanc);
  border-top: 3px solid var(--sable);
  padding: 14px 16px 18px;
  font-size: .8rem;
  color: var(--texte-doux);
}
footer.prevention .contenu {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
footer.prevention p { margin: 2px 0; }
footer.prevention strong { color: var(--bordeaux); }
footer.prevention a { color: var(--bordeaux); }

.carte {
  background: var(--blanc);
  color: var(--texte);
  border-radius: var(--rayon);
  border-top: 3px solid var(--or);
  padding: clamp(18px, 4vw, 30px);
  box-shadow: 0 6px 24px rgba(74, 25, 21, .10);
}
.carte h2 {
  margin-top: 0;
  font-family: var(--titre);
  font-weight: 400;
  color: var(--bordeaux);
  font-size: clamp(1.35rem, 5vw, 1.8rem);
  letter-spacing: -.01em;
}

label { display: block; font-weight: 500; margin: 14px 0 6px; color: var(--texte-doux); }
input[type=tel], input[type=email], input[type=password], input[type=text], input[type=number], textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  padding: 13px 14px;
  border: 1px solid #d6cfc4;
  border-radius: var(--rayon);
  background: var(--blanc);
  color: var(--texte);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sable); box-shadow: 0 0 0 3px rgba(176, 151, 109, .25); }

.case { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; margin-top: 16px; }
.case input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--bordeaux); }

button, .bouton {
  font-family: var(--corps);
  cursor: pointer;
  border: 0;
  border-radius: var(--rayon);
  padding: 15px 22px;
  font-size: .85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--bordeaux);
  color: var(--blanc);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: transform .08s, background .15s;
}
button:hover { background: var(--bordeaux-clair); }
button:active { transform: scale(.98); }
button:disabled { opacity: .55; cursor: default; }
button.or { background: var(--or); color: var(--blanc); }
button.or:hover { background: var(--or-fonce); }
button.secondaire { background: var(--gris-fond); color: var(--bordeaux); border: 1px solid #d6cfc4; }
button.large { width: 100%; margin-top: 20px; }

.erreur {
  background: #fbeceb;
  color: var(--rouge);
  border-left: 3px solid var(--rouge);
  border-radius: var(--rayon);
  padding: 10px 14px;
  margin-top: 14px;
  font-weight: 500;
}
.info {
  background: #f7f1e6;
  color: var(--bordeaux-clair);
  border-left: 3px solid var(--sable);
  border-radius: var(--rayon);
  padding: 10px 14px;
  margin-top: 14px;
}
.cache { display: none !important; }
.centre { text-align: center; }
.petit { font-size: .85rem; color: var(--texte-doux); }

/* Bouton central "Jouer" : reprend l'anneau doré du logo */
.zone-jouer { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.bouton-jouer {
  width: min(60vw, 240px);
  height: min(60vw, 240px);
  border-radius: 50%;
  padding: 0;
  font-family: var(--titre);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  letter-spacing: 3px;
  background: var(--bordeaux);
  color: var(--blanc);
  border: 4px solid var(--blanc);
  box-shadow: 0 0 0 4px var(--or), 0 14px 34px rgba(74, 25, 21, .35);
  animation: pulse 2.4s infinite;
}
.bouton-jouer:hover { background: var(--bordeaux-clair); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--or), 0 14px 34px rgba(74, 25, 21, .35); }
  50% { box-shadow: 0 0 0 4px var(--or), 0 0 0 16px rgba(221, 154, 11, .15), 0 14px 34px rgba(74, 25, 21, .35); }
}
.regles { max-width: 460px; line-height: 1.55; color: var(--texte-doux); }
.regles strong { color: var(--bordeaux); }

/* Question */
.entete-question { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.badge {
  background: var(--bordeaux); color: var(--blanc); border-radius: var(--rayon);
  padding: 6px 12px; font-size: .75rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 500;
}
.chrono { font-family: var(--titre); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.6rem; color: var(--bordeaux); }
.barre { height: 6px; background: #e3ddd3; border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.barre > div { height: 100%; background: var(--or); width: 100%; transition: width .1s linear, background .3s; }
.barre.urgent > div { background: var(--rouge); }
.texte-question {
  font-family: var(--titre);
  font-size: clamp(1.25rem, 5vw, 1.65rem);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 20px;
  color: var(--bordeaux);
}
.reponses { display: grid; gap: 10px; }
.reponses.vf { grid-template-columns: 1fr 1fr; }
.reponses button {
  background: var(--blanc);
  color: var(--texte);
  border: 1px solid #d6cfc4;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  font-weight: 400;
  padding: 14px;
  min-height: 56px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.reponses button:hover { background: #faf6ef; border-color: var(--sable); }
.reponses.vf button {
  justify-content: center;
  font-family: var(--titre);
  font-style: italic;
  font-weight: 700;
  font-size: 1.4rem;
  min-height: 90px;
  color: var(--bordeaux);
}
.reponses button .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--or); color: var(--bordeaux);
  display: grid; place-items: center; font-size: .9rem; font-weight: 700;
}
.reponses button.choisi { border-color: var(--bordeaux); background: #f7f1e6; }

.retour {
  text-align: center; margin-top: 16px; min-height: 1.6em;
  font-family: var(--titre); font-style: italic; font-size: 1.15rem; color: var(--sable);
}

/* Résultat */
.lot { font-family: var(--titre); font-size: clamp(1.25rem, 4vw, 1.7rem); color: var(--bordeaux); margin: 8px 0 4px; line-height: 1.25; }
.etoiles { font-size: 1.6rem; letter-spacing: 4px; color: var(--or); }
.qr {
  background: var(--blanc); border: 1px solid #e3ddd3; border-radius: var(--rayon);
  padding: 10px; width: min(78vw, 300px); margin: 14px auto;
}
.qr svg { width: 100%; height: auto; display: block; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: clamp(.85rem, 3.4vw, 1.02rem); letter-spacing: .05em; word-break: break-all; color: var(--texte-doux); }

@media (min-width: 900px) {
  main { max-width: 760px; }
  .reponses:not(.vf) { grid-template-columns: 1fr 1fr; }
}
