/*
 * Feuille de style du site public de Zilko.
 *
 * Les couleurs viennent du thème de l'appli (src/config/theme.ts, docs/logo/README.md) et la règle
 * des deux cyans y est la même : le cyan clair (#22D3EE) UNIQUEMENT sur fond sombre, le cyan foncé
 * (#0E7490) partout où il faut se lire sur fond clair. Un test le vérifie (scripts/site.test.ts).
 *
 * Aucune dépendance, aucun script, aucune police tierce : le site est fait pour n'avoir rien à
 * voler et rien à casser.
 */

@font-face {
  font-family: 'Archivo';
  src: url('polices/Archivo-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('polices/Archivo-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('polices/Archivo-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

:root {
  --noir: #111827;
  --cyan-surface: #22d3ee;
  --cyan-texte: #0e7490;
  --cyan-pale: #ecfeff;
  --jaune: #facc15;
  --gris: #6b7280;
  --gris-sombre: #9ca3af;
  --papier: #f2f1ee;
  --papier-fonce: #e4e1da;
  --blanc: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--noir);
  background: var(--papier);
  -webkit-text-size-adjust: 100%;
}

.centre {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

a {
  color: var(--cyan-texte);
}

/* --- Barre du haut -------------------------------------------------------------------------- */

.entete {
  background: var(--noir);
  padding: 1rem 0;
}
.entete .centre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.entete img {
  height: 2.5rem;
  width: auto;
  display: block;
}
.entete nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.entete nav a {
  color: var(--blanc);
  text-decoration: none;
  font-weight: 700;
}
.entete nav a:hover,
.entete nav a:focus-visible {
  color: var(--cyan-surface);
}

/* --- Boutons -------------------------------------------------------------------------------- */

.bouton {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}
.bouton-principal {
  background: var(--cyan-texte);
  color: var(--blanc);
}
.bouton-principal:hover,
.bouton-principal:focus-visible {
  background: #0b5c73;
}
/* Sur le bandeau sombre : le cyan clair est lisible, et le texte repasse en noir. */
.bandeau .bouton-principal {
  background: var(--cyan-surface);
  color: var(--noir);
}
.bandeau .bouton-principal:hover,
.bandeau .bouton-principal:focus-visible {
  background: #67e8f9;
}
.bouton-second {
  border-color: currentColor;
  color: var(--cyan-texte);
}
.bandeau .bouton-second {
  color: var(--blanc);
}

/* --- Bandeau d'accueil ---------------------------------------------------------------------- */

.bandeau {
  background: var(--noir);
  color: var(--blanc);
  padding: 4.5rem 0 5rem;
}
.bandeau h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 1.25rem;
  max-width: 22ch;
}
.bandeau p {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--gris-sombre);
  max-width: 52ch;
  margin: 0 0 2rem;
}
.bandeau .actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.bandeau .sous-action {
  color: var(--gris-sombre);
  font-size: 0.95rem;
  margin: 1.1rem 0 0;
}

/* --- Sections ------------------------------------------------------------------------------- */

section {
  padding: 4rem 0;
}
section.claire {
  background: var(--blanc);
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
}
.intro {
  color: var(--gris);
  max-width: 62ch;
  margin: 0 0 2.5rem;
}

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.75rem;
}
.carte {
  background: var(--papier);
  border: 1px solid var(--papier-fonce);
  border-radius: 1rem;
  padding: 1.5rem;
}
section.claire .carte {
  background: var(--papier);
}
.carte h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--cyan-texte);
}
.carte p {
  margin: 0;
  color: var(--noir);
}

/* --- Tarifs --------------------------------------------------------------------------------- */

.offres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 2rem;
  align-items: start;
}
.offre {
  background: var(--blanc);
  border: 2px solid var(--papier-fonce);
  border-radius: 1.25rem;
  padding: 2rem;
}
.offre.mise-en-avant {
  border-color: var(--cyan-texte);
}
.offre h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}
.prix {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0.5rem 0 0;
  line-height: 1;
}
.prix .unite {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gris);
  display: block;
  margin-top: 0.5rem;
}
.offre ul {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0;
}
.offre li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.7rem;
}
.offre li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--cyan-texte);
}

.encadre {
  background: var(--cyan-pale);
  border-left: 4px solid var(--cyan-texte);
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0 0;
}
.encadre p {
  margin: 0;
}

/* --- Pages de texte (mentions, CGV, confidentialité) ---------------------------------------- */

.texte {
  background: var(--blanc);
  padding: 3.5rem 0 4.5rem;
}
.texte .centre {
  width: min(100% - 2.5rem, 46rem);
}
.texte h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
}
.texte .date {
  color: var(--gris);
  margin: 0 0 2.5rem;
}
.texte h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.5rem;
}
.texte dl {
  margin: 0 0 1.5rem;
}
.texte dt {
  font-weight: 700;
  margin-top: 0.75rem;
}
.texte dd {
  margin: 0;
}

/* --- Pied ----------------------------------------------------------------------------------- */

footer {
  background: var(--noir);
  color: var(--gris-sombre);
  padding: 3rem 0;
  font-size: 0.95rem;
}
footer .centre {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
footer a {
  color: var(--blanc);
  text-decoration: none;
}
footer a:hover,
footer a:focus-visible {
  color: var(--cyan-surface);
}
footer nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
footer p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--cyan-texte);
  outline-offset: 2px;
}
.bandeau :focus-visible,
.entete :focus-visible,
footer :focus-visible {
  outline-color: var(--cyan-surface);
}

/* --- Surtitre du bandeau -------------------------------------------------------------------- */

.surtitre {
  color: var(--cyan-surface);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

/* --- Tableau de comparaison ----------------------------------------------------------------- */

.comparaison {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.comparaison th,
.comparaison td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--papier-fonce);
  vertical-align: top;
}
.comparaison thead th {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gris);
  border-bottom: 2px solid var(--noir);
}
/* La colonne Zilko : fond teinté et texte d'encre, pour qu'on la lise en premier. */
.comparaison thead th:last-child {
  color: var(--cyan-texte);
}
.comparaison tbody th {
  font-weight: 700;
  width: 12rem;
}
.comparaison td:first-of-type {
  color: var(--gris);
}
.comparaison td:last-child {
  background: var(--cyan-pale);
  font-weight: 500;
}

/* Sous 52rem, le tableau se lit mal en colonnes : chaque ligne devient un bloc. */
@media (max-width: 52rem) {
  .comparaison,
  .comparaison tbody,
  .comparaison tr,
  .comparaison th,
  .comparaison td {
    display: block;
    width: auto;
  }
  .comparaison thead {
    display: none;
  }
  .comparaison tr {
    border-bottom: 2px solid var(--noir);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
  }
  .comparaison tbody th {
    font-size: 1.1rem;
    border-bottom: none;
    padding-bottom: 0.25rem;
  }
  .comparaison td {
    border-bottom: none;
    padding-top: 0.35rem;
  }
  .comparaison td:first-of-type::before {
    content: 'Aujourd’hui : ';
    font-weight: 700;
  }
  .comparaison td:last-child {
    border-radius: 0.6rem;
  }
  .comparaison td:last-child::before {
    content: 'Avec Zilko : ';
    font-weight: 700;
    color: var(--cyan-texte);
  }
}

/* Une phrase sous le prix : ce que l'offre promet, en six mots. */
.promesse {
  margin: 1.25rem 0 0;
  font-weight: 700;
  color: var(--cyan-texte);
}
