/* Pas de police distante : la CSP des pages HTML (style-src 'self') bloquerait
   l'@import Google Fonts. Pile locale, avec une cursive de repli pour le titre. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Vifs de la marque = décor (bordures, fonds). Tout TEXTE coloré et tout
     fond portant du texte blanc passent par les variantes « -texte »,
     mesurées ≥ 4,5:1 (cyan #0e7490 : 5,4 ; orange #b45309 : 5,0 ; vert #4d7c0f : 5,0). */
  --cyan:        #29b6d5;
  --cyan-dark:   #0e7490;
  --cyan-darker: #155e75;
  --cyan-pale:   #e0f7fc;
  --orange:      #f5821f;
  --orange-texte:#b45309;
  --orange-dark: #9a3412;
  --green-bar:   #4d7c0f;
  --white:       #ffffff;
  --gray:        #555;
  --gray-texte:  #64748b;
  --police:      system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre:"Dancing Script", "Brush Script MT", "Segoe Script", cursive;
  --gray-light:  #f4f8fb;
  --bg:          #e8f6fb;
  --radius:      14px;
  --shadow:      0 3px 16px rgba(0,0,0,0.10);
}

body {
  font-family: var(--police);
  background: var(--bg);
  color: #222;
  min-height: 100vh;
}

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--green-bar);
  color: white;
  text-align: center;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ===== HEADER ===== */
header {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.logo-icon { font-size: 2.8rem; }
.logo-text h1 {
  font-family: var(--police-titre);
  font-size: 1.9rem;
  color: var(--cyan-dark);
  line-height: 1.1;
}
.logo-text .subtitle {
  color: var(--orange-texte);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ===== HERO BANNER ===== */
.hero {
  background: linear-gradient(135deg, var(--cyan-dark) 0%, var(--cyan-darker) 100%);
  color: white;
  text-align: center;
  padding: 36px 20px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.hero h2 {
  font-family: var(--police-titre);
  font-size: 2.2rem;
  margin-bottom: 8px;
  position: relative;
}
.hero p {
  font-size: 1rem;
  opacity: 0.92;
  position: relative;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
  border-top: 3px solid var(--cyan);
}
.card h2 {
  font-size: 1.05rem;
  color: var(--cyan-dark);
  margin-bottom: 6px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hint { color: var(--gray-texte); font-size: 0.85rem; margin-bottom: 16px; }
.req { color: var(--orange-texte); }

/* ===== FIELDS ===== */
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 5px; }
/* Cale la date sur la moitié gauche de la rangée, comme les deux champs du dessus.
   En colonne (mobile) elle n'a plus rien à caler : elle ne ferait qu'ajouter le
   gap de la rangée sous le champ. */
.field-vide { display: none; }
@media (min-width: 521px) { .field-vide { display: block; } }
.field-row--suite { margin-top: 14px; }
label { font-size: 0.88rem; font-weight: 700; color: #444; }
input[type="text"], input[type="date"], select, textarea {
  border: 1.5px solid #d0e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: var(--police);
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f9fdff;
  color: #222;
  width: 100%;
}
input[type="text"]:focus-visible, input[type="date"]:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--cyan-dark);
  box-shadow: 0 0 0 3px rgba(14,116,144,0.25);
  background: white;
}
button:focus-visible, a:focus-visible { outline: 3px solid var(--cyan-dark); outline-offset: 2px; }
textarea { min-height: 120px; }
.counter { font-size: 0.8rem; color: var(--gray-texte); text-align: right; margin-top: 6px; }
.counter--limite { color: var(--orange-texte); font-weight: 700; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

/* Icône calendrier cyan */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(55%) sepia(80%) saturate(400%) hue-rotate(160deg);
  cursor: pointer;
  width: 18px;
  height: 18px;
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper { color: #555; }
input[type="date"]::-webkit-datetime-edit { padding: 0; }
textarea { resize: vertical; }

/* ===== SCORE GLOBAL ===== */
.score-global {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.score-global .score-btn {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 2px solid #d0e8f0;
  background: #f9fdff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  color: #999;
  font-family: var(--police);
}
.score-global .score-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: #fff8f3;
}
.score-global .score-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  box-shadow: 0 2px 8px rgba(245,130,31,0.35);
}
/* Vide tant qu'aucune note n'est choisie : `min-height` y réservait une bande
   sous la rangée de notes, que la carte creusait encore de son rembourrage.
   La hauteur revient dès que le libellé a quelque chose à dire, donc rien ne
   saute quand l'utilisateur clique. */
.score-label {
  font-size: 1rem;
  color: var(--orange-texte);
  font-weight: 700;
  line-height: 1.5;
}
.score-label:not(:empty) { min-height: 24px; margin-top: 2px; }

/* ===== CRITÈRES ===== */
.criteria-list { display: flex; flex-direction: column; gap: 14px; }
.criterion {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--gray-light);
  border-radius: 10px;
}
.criterion-label {
  width: 195px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #444;
}
.score-row { display: flex; gap: 4px; flex-wrap: wrap; }
.score-row .score-btn {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1.5px solid #d0e8f0;
  background: white;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  color: #999;
  font-family: var(--police);
}
.score-row .score-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.score-row .score-btn.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: white;
}
.score-row .score-btn.na-btn {
  color: #aaa;
  border-color: #ddd;
  font-size: 0.72rem;
  width: auto;
  padding: 0 8px;
}
.score-row .score-btn.na-btn:hover {
  border-color: #aaa;
  color: #666;
}
.score-row .score-btn.na-btn.active {
  background: #6b7280;
  border-color: #6b7280;
  color: white;
}

/* ===== SUBMIT ===== */
.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--orange-texte);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--police);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(180,83,9,0.3);
}
.btn-submit:hover {
  background: var(--orange-dark);
  box-shadow: 0 6px 18px rgba(154,52,18,0.4);
}
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { background: #9ca3af; box-shadow: none; cursor: not-allowed; }
/* Mention d'information (annexe E de la politique de confidentialité), juste
   au-dessus du bouton d'envoi : visible au moment où l'on dépose son nom. */
.mention-donnees { color: var(--gray-texte); font-size: 0.85rem; line-height: 1.5; margin: 0 0 12px; text-align: center; }
.mention-donnees a { color: inherit; text-decoration: underline; }
.error-msg { color: #b91c1c; font-size: 0.9rem; font-weight: 600; margin-top: 10px; text-align: center; }
.error-msg:empty { display: none; }

/* ===== MERCI ===== */
.merci-wrap {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 16px 56px;
}
.merci-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
  border-top: 4px solid var(--cyan);
}
.merci-icon { font-size: 4rem; margin-bottom: 16px; }
.merci-card h1 {
  font-family: var(--police-titre);
  color: var(--cyan-dark);
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.merci-card p { color: var(--gray); font-size: 1rem; line-height: 1.6; }
.merci-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.btn-review {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity 0.2s, transform 0.1s;
  font-family: var(--police);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.btn-review:active { transform: scale(0.98); }
.btn-google { background: #1a5fb4; color: white; box-shadow: 0 3px 10px rgba(26,95,180,0.3); }
.btn-tripadvisor { background: #34E0A1; color: #111; box-shadow: 0 3px 10px rgba(52,224,161,0.3); }
.btn-review:hover { opacity: 0.9; }
.copy-hint { font-size: 0.8rem; color: var(--gray-texte); margin-top: 6px; }
.merci-accroche { margin-top: 20px; font-weight: 700; color: var(--cyan-dark); }
.merci-retour { margin-top: 32px; }
.merci-retour a { color: var(--cyan-dark); font-size: 0.9rem; }
.btn-review { min-height: 48px; }
.comment-preview {
  background: var(--cyan-pale);
  border-left: 4px solid var(--cyan);
  padding: 14px 16px;
  border-radius: 8px;
  font-style: italic;
  color: #333;
  margin: 20px 0 8px;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
}
.copied-badge {
  display: inline-block;
  background: var(--cyan-dark);
  color: white;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}
.copied-badge.show { opacity: 1; }

/* ===== FOOTER ===== */
.page-footer {
  background: var(--cyan-dark);
  color: white;
  text-align: center;
  padding: 16px;
  font-size: 0.82rem;
}
.footer-link { color: white; font-size: 0.75rem; text-decoration: underline; }

@media (max-width: 520px) {
  .criterion-label { width: 100%; }
  .criterion { flex-direction: column; align-items: flex-start; }
  header { flex-direction: column; gap: 6px; text-align: center; }
  .score-global .score-btn { width: 42px; height: 42px; }
  .hero h2 { font-size: 1.7rem; }
}
