/* Portail SAV Atout Fermetures — page autonome, téléphone d'abord */

:root {
  --marque: #0154a6;
  --marque-fonce: #003f7d;
  --marque-clair: #e8f1fb;
  --texte: #1c252e;
  --secondaire: #637381;
  --bordure: #dfe3e8;
  --fond: #f4f6f8;
  --carte: #ffffff;
  --succes: #118d57;
  --succes-clair: #e6f6ee;
  --erreur: #b71d18;
  --erreur-clair: #fdecea;
  --attention: #b76e00;
  --rayon: 12px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
}

a {
  color: var(--marque);
}

/* en-tête */
.entete {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--carte);
  border-bottom: 1px solid var(--bordure);
}

.logo {
  display: block;
  width: 132px;
  height: auto;
}

.entete-titre {
  padding-left: 12px;
  border-left: 1px solid var(--bordure);
  color: var(--secondaire);
  font-size: 14px;
  font-weight: 600;
}

main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  outline: none;
}

h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
}

h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.intro {
  margin: 0 0 20px;
  color: var(--secondaire);
}

.chargement {
  color: var(--secondaire);
}

/* cartes et étapes */
.carte {
  margin-bottom: 16px;
  padding: 18px 16px;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
}

fieldset.carte {
  min-width: 0;
}

legend.etape {
  float: left;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
}

legend.etape + * {
  clear: both;
}

.etape-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--marque);
  color: #fff;
  font-size: 14px;
  vertical-align: 1px;
}

.aide {
  margin: 4px 0 0;
  color: var(--secondaire);
  font-size: 14px;
}

/* champs */
label.champ {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 15px;
}

label.champ span.facultatif {
  color: var(--secondaire);
  font-weight: 400;
}

input[type='text'],
input[type='email'],
input[type='tel'],
textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid #c4cdd5;
  border-radius: 10px;
  background: #fff;
  color: var(--texte);
  font: inherit;
  font-weight: 400;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
.choix input:focus-visible + span,
a:focus-visible {
  outline: 3px solid rgba(1, 84, 166, 0.35);
  outline-offset: 2px;
}

/* choix (produits, problèmes) : grandes zones cliquables */
.choix {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid var(--bordure);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 400;
}

.choix:has(input:checked) {
  border-color: var(--marque);
  background: var(--marque-clair);
}

.choix input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--marque);
}

.choix-texte {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* consentement */
.case {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  cursor: pointer;
}

.case input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--marque);
}

/* pot de miel : hors écran, jamais visible ni atteignable au clavier */
.pot {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--marque);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.bouton:hover {
  background: var(--marque-fonce);
}

.bouton[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.bouton.large {
  width: 100%;
}

.bouton.secondaire {
  background: #fff;
  color: var(--marque);
  border: 1px solid var(--marque);
}

.bouton.secondaire:hover {
  background: var(--marque-clair);
}

.lien-bouton {
  padding: 0;
  border: 0;
  background: none;
  color: var(--marque);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* fichiers */
.depot {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 20px 12px;
  border: 2px dashed #c4cdd5;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
}

.depot:hover,
.depot.survol {
  border-color: var(--marque);
  background: var(--marque-clair);
}

.depot input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.depot strong {
  color: var(--marque);
}

.fichiers {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.fichier {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--bordure);
  font-size: 14px;
}

.fichier-nom {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fichier progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 6px;
  accent-color: var(--marque);
}

.fichier .etat {
  color: var(--secondaire);
}

.fichier.ok .etat {
  color: var(--succes);
}

.fichier.echec .etat {
  color: var(--erreur);
}

/* messages */
.alerte {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
}

.alerte.erreur {
  background: var(--erreur-clair);
  color: var(--erreur);
}

.alerte.info {
  background: var(--marque-clair);
  color: var(--marque-fonce);
}

.alerte.succes {
  background: var(--succes-clair);
  color: var(--succes);
}

/* dossiers et suivi */
.dossiers {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dossiers li {
  padding: 10px 0;
  border-top: 1px solid var(--bordure);
  font-size: 15px;
}

.dossiers li:first-child {
  border-top: 0;
  padding-top: 0;
}

.pastille {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--marque-clair);
  color: var(--marque-fonce);
  font-size: 13px;
  font-weight: 700;
}

.pastille.termine {
  background: var(--succes-clair);
  color: var(--succes);
}

.reference {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.resume {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 15px;
}

.resume dt {
  color: var(--secondaire);
}

.resume dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.etapes {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
}

.etapes::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 2px;
  background: var(--bordure);
}

.etapes li {
  position: relative;
  padding: 0 0 14px;
  font-size: 15px;
}

.etapes li::before {
  content: '';
  position: absolute;
  top: 5px;
  left: -21px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--marque);
  box-shadow: 0 0 0 3px var(--carte);
}

.etapes li:last-child {
  padding-bottom: 0;
  font-weight: 700;
}

.etapes time,
.message time {
  display: block;
  color: var(--secondaire);
  font-size: 13px;
  font-weight: 400;
}

.message {
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--fond);
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message .pj {
  display: block;
  margin-top: 4px;
  color: var(--secondaire);
  font-size: 13px;
  white-space: normal;
}

.confirmation {
  text-align: center;
}

.confirmation .coche {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--succes-clair);
  color: var(--succes);
  font-size: 34px;
}

.pied {
  padding: 20px 16px 28px;
  border-top: 1px solid var(--bordure);
  background: var(--carte);
  color: var(--secondaire);
  font-size: 13px;
  text-align: center;
}

.pied p {
  max-width: 680px;
  margin: 0 auto 8px;
}

.noscript {
  max-width: 680px;
  margin: 0 auto 20px;
  padding: 0 16px;
}

@media (min-width: 600px) {
  main {
    padding-top: 32px;
  }

  h1 {
    font-size: 28px;
  }

  .carte {
    padding: 22px 24px;
  }

  .logo {
    width: 160px;
  }
}
