/* Vitrine www.suissekit.ch, d'après la maquette validée eleves-theme-v2 (éventail de cartes, boutons en pilule).
   CSP stricte : aucune ressource externe, polices servies par le site.
   Couleurs sombres : uniquement dans les blocs @media (prefers-color-scheme: dark), dont theme.js change la condition. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("polices/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("polices/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("polices/inter-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("polices/instrument-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --nuit: #0b1f30;
  --lac: #1b6ca8;
  --lac-clair: #6db7dc;
  --neige: #f6f9fb;
  --encre: #16293a;
  --encre-2: #5a6d7e;
  --surface: #fff;
  --bord: #d8e2ea;
  --bord-2: #c9d6e0;
  --puce: #e8eef3;
  --lien: var(--lac);
  --focus: var(--lac);
  --carte-bord: #fff;
  --carte-ombre: 0 30px 60px -20px rgb(11 31 48 / 45%);
  --bande: var(--nuit);
  --bande-bord: transparent;
  --ok-fond: #e3f4ea;
  --ok-encre: #1d5a37;
  --alerte-fond: #fde8ea;
  --alerte-encre: #8a1020;
  --police: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-serif: "Instrument Serif", Georgia, serif;
  --pilule: 99px;
  --courbe: cubic-bezier(0.2, 0.8, 0.2, 1);
  --marge: 5vw;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --neige: #0d1720;
    --encre: #e7eff5;
    --encre-2: #a5b7c5;
    --surface: #15232f;
    --bord: #2a3c4b;
    --bord-2: #2a3c4b;
    --puce: #1a2b39;
    --lien: var(--lac-clair);
    --focus: var(--lac-clair);
    --carte-bord: #15232f;
    --carte-ombre: 0 30px 60px -20px rgb(0 0 0 / 70%);
    --bande: #0b1f30;
    --bande-bord: #2a3c4b;
    --ok-fond: #143222;
    --ok-encre: #9fe0b8;
    --alerte-fond: #3a1519;
    --alerte-encre: #f5b5bd;
  }
}

/* ---------- Base ---------- */

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

/* Les commandes inutiles sans JavaScript restent cachées, quelle que soit la règle d'affichage du composant. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.5;
  background: var(--neige);
  color: var(--encre);
  transition: background-color 0.3s, color 0.3s;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.serif {
  font-family: var(--police-serif);
  font-style: italic;
  font-weight: 400;
}

.evitement {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--encre);
  color: var(--neige);
  border-radius: var(--pilule);
  padding: 10px 18px;
  font-weight: 600;
  text-decoration: none;
}
.evitement:focus {
  top: 12px;
}

main {
  display: block;
}

/* ---------- En-tête ---------- */

.entete {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 22px var(--marge);
}

.entete__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--encre);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  border-radius: 10px;
}
.entete__logo img {
  display: block;
  width: 30px;
  height: 30px;
  transition: transform 0.4s var(--courbe);
}
.entete__logo:hover img {
  transform: rotate(-8deg) scale(1.08);
}

.menu {
  margin: 0 auto;
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--pilule);
  padding: 4px;
}
.menu a {
  color: var(--encre-2);
  text-decoration: none;
  font-size: 14px;
  padding: 7px 16px;
  border-radius: var(--pilule);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.menu a:hover {
  color: var(--encre);
  background: var(--puce);
}
.menu a.actif {
  background: var(--encre);
  color: var(--neige);
  font-weight: 600;
}

/* Choix du thème : des boutons radio présentés en pilule segmentée. */
.theme {
  display: flex;
  gap: 2px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--pilule);
  padding: 3px;
  min-inline-size: 0;
}
.theme legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.theme label {
  position: relative;
  display: block;
  cursor: pointer;
}
.theme input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.theme label > span {
  display: block;
  font-size: 13px;
  color: var(--encre-2);
  border-radius: var(--pilule);
  padding: 6px 10px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.theme label:hover > span {
  color: var(--encre);
}
.theme input:checked + span {
  background: var(--encre);
  color: var(--neige);
}
.theme input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.entete__connexion,
.bouton,
.contact__envoyer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--pilule);
  padding: 10px 12px 10px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--courbe), box-shadow 0.25s, background-color 0.2s;
}
.entete__connexion span,
.bouton span,
.contact__envoyer span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  transition: transform 0.25s var(--courbe);
}
.entete__connexion:hover span,
.bouton:hover span {
  transform: translateX(3px);
}

.entete__connexion {
  background: var(--surface);
  color: var(--encre);
  border: 1px solid var(--bord);
}
.entete__connexion span {
  background: var(--encre);
  color: var(--neige);
}

.bouton,
.contact__envoyer {
  background: var(--encre);
  color: var(--neige);
  border: 0;
}
.bouton span {
  background: var(--neige);
  color: var(--encre);
}
.bouton:hover,
.contact__envoyer:hover,
.entete__connexion:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgb(11 31 48 / 55%);
}
.contact__envoyer {
  padding: 13px 24px;
}
.contact__envoyer:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* ---------- Titre de page ---------- */

.titre {
  text-align: center;
  padding: 40px var(--marge) 34px;
}
.titre > * {
  animation: apparait 0.8s var(--courbe) both;
}
.titre > :nth-child(2) {
  animation-delay: 0.08s;
}
.titre > :nth-child(3) {
  animation-delay: 0.16s;
}
.titre > :nth-child(n + 4) {
  animation-delay: 0.24s;
}

.titre__etiquette {
  display: inline-block;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--puce);
  color: var(--encre-2);
  border-radius: var(--pilule);
  padding: 6px 14px;
}

.titre h1 {
  max-width: 980px;
  margin: 18px auto 20px;
  font-size: clamp(36px, 5.5vw, 66px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.titre h1 .serif {
  font-size: 1.08em;
  letter-spacing: -0.01em;
}

.titre__intro {
  max-width: 620px;
  margin: 0 auto;
  color: var(--encre-2);
  font-size: 18px;
  line-height: 1.5;
}

.titre__actions {
  margin: 28px 0 0;
}
.titre__note {
  margin: 14px auto 0;
  max-width: 560px;
  color: var(--encre-2);
  font-size: 14px;
}

/* ---------- Éventail de cartes ---------- */

.eventail-zone {
  overflow: hidden;
  padding: 0 0 50px;
  text-align: center;
  animation: apparait 0.9s 0.2s var(--courbe) both;
}

/* Sans JavaScript, et sur un écran étroit : une rangée de cartes qui défile, aimantée sur chacune. */
.eventail {
  display: flex;
  gap: 18px;
  justify-content: safe center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 16px 30px;
  scrollbar-width: thin;
}

.carte {
  position: relative;
  flex: 0 0 300px;
  width: 300px;
  height: 470px;
  border: 5px solid var(--carte-bord);
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  text-align: left;
  text-decoration: none;
  scroll-snap-align: center;
  box-shadow: var(--carte-ombre);
  transition: transform 0.6s var(--courbe), border-color 0.3s, box-shadow 0.3s;
}
/* Reflet qui balaie la carte. */
.carte::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 14%) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: brille 4s linear infinite;
}
/* Assombrit le bas pour que le texte blanc reste lisible sur toutes les couleurs. */
.carte::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, transparent 35%, rgb(0 0 0 / 72%));
}
.carte:focus-visible {
  outline-offset: 5px;
}

.carte--lac {
  background: radial-gradient(circle at 30% 20%, #3a98c9, #1b6ca8 45%, #0b1f30);
}
.carte--soleil {
  background: radial-gradient(circle at 70% 20%, #f5b83d, #e3743a 40%, #7a2e4d 85%);
}
.carte--sapin {
  background: radial-gradient(circle at 40% 25%, #7fd1a0, #2e7d4f 50%, #0b1f30);
}
.carte--ardoise {
  background: radial-gradient(circle at 40% 25%, #9aa9b6, #4c6072 50%, #16293a);
}

.carte__video,
.carte__etat {
  position: absolute;
  left: 16px;
  font-size: 11px;
  border-radius: var(--pilule);
  padding: 4px 10px;
}
.carte__video {
  top: 16px;
  background: rgb(0 0 0 / 50%);
}
.carte__etat {
  top: 46px;
  font-weight: 600;
  background: rgb(11 31 48 / 70%);
  border: 1px solid rgb(255 255 255 / 35%);
}

.carte__sujet {
  position: absolute;
  right: 16px;
  top: 16px;
  max-width: 55%;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  color: var(--nuit);
  border-radius: var(--pilule);
  padding: 4px 10px;
}

.carte__lecture {
  position: absolute;
  left: 50%;
  top: 26%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgb(255 255 255 / 18%);
  border: 1px solid rgb(255 255 255 / 45%);
  backdrop-filter: blur(8px);
  font-size: 26px;
  transition: transform 0.3s var(--courbe);
}
.carte:hover .carte__lecture,
.carte:focus-visible .carte__lecture {
  transform: translate(-50%, -50%) scale(1.1);
}

.carte__bas {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
}
.carte__bas h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.carte__texte {
  display: block;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #e2ecf3;
}
.carte__etiquettes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.carte__etiquettes li {
  font-size: 11px;
  background: rgb(255 255 255 / 16%);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: var(--pilule);
  padding: 4px 9px;
}
.carte__bouton {
  display: block;
  text-align: center;
  background: #fff;
  color: var(--nuit);
  border-radius: var(--pilule);
  padding: 12px;
  font-weight: 600;
  transition: letter-spacing 0.3s var(--courbe);
}
.carte:hover .carte__bouton {
  letter-spacing: 0.02em;
}

/* Éventail (JavaScript, écran assez large) : cartes empilées en arc, positions posées par vitrine.js. */
.eventail--actif {
  position: relative;
  display: block;
  height: 520px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}
.eventail--actif .carte {
  position: absolute;
  left: 50%;
  top: 10px;
  margin-left: -150px;
  z-index: var(--z, 1);
  transform: translateX(var(--x, 0)) translateY(var(--y, 0)) scale(var(--echelle, 1));
  cursor: pointer;
}
.eventail--actif .carte:not(.carte--centre):hover {
  border-color: var(--lac-clair);
}

.eventail__nav {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  color: var(--encre-2);
  font-size: 14px;
}
.eventail__compteur {
  min-width: 4ch;
  font-variant-numeric: tabular-nums;
}
.eventail__fleche {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--bord-2);
  background: var(--surface);
  color: var(--encre);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.25s var(--courbe), border-color 0.2s;
}
.eventail__fleche:hover {
  border-color: var(--lien);
  transform: scale(1.08);
}
.eventail__fleche:active {
  transform: scale(0.95);
}

/* ---------- Engagements : bande sombre, comme le bloc « confiance » de la maquette d'accueil ---------- */

.arguments {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0 var(--marge) 80px;
  border-radius: 32px;
  background: var(--bande);
  border: 1px solid var(--bande-bord);
  color: #fff;
  padding: 48px var(--marge);
}
/* Halo lumineux qui flotte lentement derrière les engagements. */
.arguments::before,
.arguments::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: flotte 14s ease-in-out infinite alternate;
}
.arguments::before {
  width: 420px;
  height: 420px;
  left: -120px;
  top: -160px;
  background: #1b6ca8;
}
.arguments::after {
  width: 260px;
  height: 260px;
  right: 8%;
  bottom: -140px;
  background: #3a98c9;
  animation-delay: -6s;
}
.arguments ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.arguments li {
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 20px;
  padding: 22px;
  transition: transform 0.3s var(--courbe), background-color 0.3s;
}
.arguments li:hover {
  transform: translateY(-4px);
  background: rgb(255 255 255 / 10%);
}
.arguments strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.arguments span {
  color: #c7d6e2;
  font-size: 14px;
}

/* ---------- Listes d'outils (entreprises, particuliers) ---------- */

.outils,
.section,
.contact,
.legal {
  max-width: 1000px;
  margin: 0 auto 70px;
  padding: 0 var(--marge);
}

.outils > h2,
.section > h2,
.contact > h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.outils ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.outils li {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 20px;
  padding: 22px;
  transition: transform 0.3s var(--courbe), box-shadow 0.3s;
}
.outils li:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgb(11 31 48 / 45%);
}
.outils h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.outils p {
  margin: 0;
  color: var(--encre-2);
  font-size: 15px;
}
.outils__bientot {
  border-style: dashed;
}
.pastille {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--puce);
  color: var(--encre-2);
  border-radius: var(--pilule);
  padding: 3px 9px;
}

.section p {
  max-width: 680px;
  color: var(--encre-2);
  font-size: 17px;
}

/* ---------- Contact ---------- */

.contact {
  max-width: 820px;
}
.contact > p {
  margin: 0 0 22px;
  color: var(--encre-2);
  font-size: 17px;
}

/* Vide, la zone reste dans l'arbre d'accessibilité : un message inséré plus tard est bien annoncé. */
.contact__retour {
  margin: 0 0 18px;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 600;
}
.contact__retour:empty {
  margin: 0;
  padding: 0;
}
.contact__retour--envoye {
  background: var(--ok-fond);
  color: var(--ok-encre);
}
.contact__retour--invalide,
.contact__retour--limite,
.contact__retour--erreur {
  background: var(--alerte-fond);
  color: var(--alerte-encre);
}

.contact__formulaire {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 26px;
  padding: 26px;
}
.contact__formulaire > :nth-child(n + 5),
.contact__envoyer {
  grid-column: 1 / -1;
}
.contact__envoyer {
  justify-self: start;
}

.champ {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.champ input,
.champ select,
.champ textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--encre);
  background: var(--neige);
  border: 1px solid var(--bord-2);
  border-radius: 14px;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.champ textarea {
  resize: vertical;
  min-height: 140px;
}
.champ input:focus-visible,
.champ select:focus-visible,
.champ textarea:focus-visible {
  /* Contour transparent plutôt qu'absent : en mode contrastes élevés de Windows, l'ombre disparaît mais lui reste visible. */
  outline: 2px solid transparent;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus);
}
.champ--case {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  color: var(--encre-2);
}
.champ--case input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--lac);
}

.preparation {
  background: var(--surface);
  border: 1px dashed var(--bord-2);
  border-radius: 20px;
  padding: 20px 22px;
  color: var(--encre-2);
}
.preparation p {
  margin: 0;
}

/* ---------- Pages légales ---------- */

.legal {
  max-width: 760px;
  padding-top: 30px;
}
.legal h1 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.legal h2 {
  margin: 30px 0 8px;
  font-size: 20px;
  font-weight: 600;
}
.legal p {
  color: var(--encre-2);
}
.responsable {
  font-style: normal;
  line-height: 1.7;
}

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

.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 22px;
  padding: 30px var(--marge) 40px;
  border-top: 1px solid var(--bord);
  color: var(--encre-2);
  font-size: 14px;
  text-align: center;
}
.pied p {
  margin: 0;
}
.pied nav {
  display: flex;
  gap: 18px;
}

/* ---------- Animations ---------- */

@keyframes brille {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}
@keyframes flotte {
  to {
    transform: translate(60px, 40px) scale(1.15);
  }
}
@keyframes apparait {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ---------- Écrans plus étroits ---------- */

@media (max-width: 1000px) {
  .menu {
    order: 10;
    flex-basis: 100%;
    justify-content: center;
    margin: 0;
    border: 0;
    background: transparent;
    padding: 0;
    overflow-x: auto;
  }
  .entete__logo {
    margin-right: auto;
  }
}

@media (max-width: 700px) {
  :root {
    --marge: 16px;
  }
  .entete {
    padding-top: 16px;
  }
  .theme {
    order: 5;
  }
  .menu a {
    padding: 7px 11px;
    font-size: 13px;
  }
  .titre {
    padding-top: 20px;
  }
  .titre__intro {
    font-size: 16px;
  }
  .eventail {
    justify-content: flex-start;
    scroll-padding-inline: 16px;
  }
  .carte {
    flex-basis: 280px;
    width: 280px;
    height: 440px;
  }
  .arguments {
    margin-bottom: 60px;
    padding: 28px 18px;
    border-radius: 24px;
  }
  .contact__formulaire {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .theme {
    flex-basis: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Mouvement réduit demandé : ni reflet, ni halo, ni transition. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
