/* ==========================================================================
   Corelyz — Feuille de styles principale
   Design sobre, mobile first, accessible WCAG 2.1 AA.
   Couleurs : encre #13202E, sarcelle #1E9E8F, sarcelle foncée #167A6F.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables et reset
   -------------------------------------------------------------------------- */
:root {
  --encre: #13202E;
  --sarcelle: #1E9E8F;
  --sarcelle-fonce: #167A6F;
  --fond: #FFFFFF;
  --fond-alt: #F3F6F7;
  --texte: #1F2933;
  --texte-secondaire: #3E4C59;
  --bordure: #CBD2D9;
  --bordure-forte: #9AA5B1;
  --erreur: #B42318;
  --succes: #0E7C5A;
  --avertissement-fond: #FFF8E6;
  --avertissement-bordure: #B8893B;
  --rayon: 12px;
  --rayon-petit: 8px;
  --ombre: 0 4px 16px rgba(19, 32, 46, 0.08);
  --ombre-forte: 0 8px 24px rgba(19, 32, 46, 0.12);
  --max-largeur: 1120px;
  --espace-section: 4rem;
  --transition: 160ms ease;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sarcelle-fonce);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--encre);
}

:focus-visible {
  outline: 3px solid var(--sarcelle);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   2. Utilitaires
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-largeur);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--encre);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

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

.texte-centre {
  text-align: center;
}

.marge-haut {
  margin-top: 1.5rem;
}

.marge-haut-grande {
  margin-top: 2.5rem;
}

/* --------------------------------------------------------------------------
   3. Typographie
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  margin: 0 0 1rem;
  color: var(--encre);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
}

h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--texte-secondaire);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   4. En-tête et navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bordure);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.logo-lien {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--encre);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.logo-lien img {
  width: auto;
  height: 36px;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-petit);
  background: var(--fond);
  color: var(--encre);
  cursor: pointer;
}

.menu-toggle:hover {
  border-color: var(--bordure-forte);
}

.menu-toggle .barres {
  position: relative;
  width: 20px;
  height: 14px;
}

.menu-toggle .barres::before,
.menu-toggle .barres::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform var(--transition), top var(--transition);
}

.menu-toggle .barres::before {
  top: 0;
}

.menu-toggle .barres::after {
  top: 12px;
}

.menu-toggle[aria-expanded="true"] .barres::before {
  top: 6px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .barres::after {
  top: 6px;
  transform: rotate(-45deg);
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--fond);
  border-bottom: 1px solid var(--bordure);
  box-shadow: var(--ombre);
  padding: 1rem 1.25rem 1.5rem;
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.75rem 0.5rem;
  border-radius: var(--rayon-petit);
  color: var(--encre);
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--fond-alt);
  color: var(--sarcelle-fonce);
}

.site-nav .btn {
  margin-top: 0.75rem;
  width: 100%;
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .site-nav a {
    padding: 0.5rem 0.85rem;
  }

  .site-nav .btn {
    margin-top: 0;
    width: auto;
    margin-left: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   5. Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border-radius: var(--rayon-petit);
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--sarcelle-fonce);
  color: #fff;
  border-color: var(--sarcelle-fonce);
}

.btn--primary:hover {
  background: var(--encre);
  border-color: var(--encre);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--encre);
  border-color: var(--bordure-forte);
}

.btn--secondary:hover {
  background: var(--fond-alt);
  border-color: var(--encre);
  color: var(--encre);
}

.btn--bloc {
  width: 100%;
}

.btn--petit {
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   6. Sections
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--espace-section);
}

.section--alt {
  background: var(--fond-alt);
}

.section--serree {
  padding-block: 2.5rem;
}

.section-entete {
  max-width: 65ch;
  margin-bottom: 2.5rem;
}

.section-entete--centre {
  margin-inline: auto;
  text-align: center;
}

.section-entete p {
  color: var(--texte-secondaire);
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: 3rem 4rem;
  background: linear-gradient(180deg, var(--fond-alt) 0%, var(--fond) 100%);
}

.hero-grille {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-texte h1 {
  max-width: 18ch;
}

.hero-texte .lead {
  margin-top: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-visuel {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visuel img {
  width: min(100%, 320px);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(19, 32, 46, 0.12));
}

@media (min-width: 900px) {
  .hero {
    padding-block: 5rem;
  }

  .hero-grille {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
  }

  .hero-visuel {
    justify-content: flex-end;
  }

  .hero-visuel img {
    width: min(100%, 360px);
  }
}

/* --------------------------------------------------------------------------
   8. Grilles et cartes
   -------------------------------------------------------------------------- */
.grille {
  display: grid;
  gap: 1.5rem;
}

.grille--2 {
  grid-template-columns: 1fr;
}

.grille--3 {
  grid-template-columns: 1fr;
}

.grille--4 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grille--2,
  .grille--3,
  .grille--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grille--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grille--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.carte {
  display: flex;
  flex-direction: column;
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.5rem;
  box-shadow: var(--ombre);
}

.carte--mise-en-avant {
  border-color: var(--sarcelle);
  border-width: 2px;
  position: relative;
}

.carte-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.carte h3 {
  margin-bottom: 0.25rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--fond-alt);
  color: var(--texte-secondaire);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--sarcelle {
  background: rgba(30, 158, 143, 0.12);
  color: var(--sarcelle-fonce);
}

.carte p {
  color: var(--texte-secondaire);
}

.carte .btn {
  margin-top: auto;
}

.carte-liste {
  list-style: none;
  margin: 1rem 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.carte-liste li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
  color: var(--texte);
}

.carte-liste li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1rem;
  height: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23167A6F' d='M6.2 11.4 3 8.2l1.2-1.2 2 2 5.6-5.6L13 4.6z'/%3E%3C/svg%3E")
    no-repeat center / contain;
}

.carte-liste--non-disponible li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239AA5B1' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.5 10.1-1.4 1.4L8 9.4l-2.1 2.1-1.4-1.4L6.6 8 4.5 5.9l1.4-1.4L8 6.6l2.1-2.1 1.4 1.4L9.4 8z'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   9. Encadrés
   -------------------------------------------------------------------------- */
.encadre {
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.25rem 1.5rem;
  background: var(--fond);
}

.encadre--attention {
  background: var(--avertissement-fond);
  border-color: var(--avertissement-bordure);
}

.encadre--info {
  background: var(--fond-alt);
  border-color: var(--bordure);
}

.encadre h3,
.encadre h4 {
  margin-bottom: 0.5rem;
}

.encadre p:last-child,
.encadre ul:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   10. Listes de fonctions
   -------------------------------------------------------------------------- */
.fonction-bloc {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--bordure);
}

.fonction-bloc:last-child {
  border-bottom: 0;
}

.fonction-bloc h3 {
  margin-bottom: 0.5rem;
}

.fonction-bloc .badge {
  margin-bottom: 0.75rem;
}

.fonction-schema {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fond-alt);
  border-radius: var(--rayon);
  padding: 1.5rem;
}

.fonction-schema svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

@media (min-width: 768px) {
  .fonction-bloc {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
  }

  .fonction-bloc:nth-child(even) .fonction-schema {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   11. Formulaires
   -------------------------------------------------------------------------- */
.formulaire {
  display: grid;
  gap: 1.25rem;
  max-width: 640px;
}

.champ {
  display: grid;
  gap: 0.35rem;
}

.champ label {
  font-weight: 600;
  color: var(--encre);
}

.champ .obligatoire {
  color: var(--erreur);
  font-weight: 700;
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--bordure-forte);
  border-radius: var(--rayon-petit);
  background: var(--fond);
  color: var(--texte);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.champ textarea {
  min-height: 140px;
  resize: vertical;
}

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
  border-color: var(--sarcelle-fonce);
  box-shadow: 0 0 0 3px rgba(22, 122, 111, 0.18);
  outline: none;
}

.champ input[aria-invalid="true"],
.champ select[aria-invalid="true"],
.champ textarea[aria-invalid="true"] {
  border-color: var(--erreur);
}

.champ .aide {
  font-size: 0.875rem;
  color: var(--texte-secondaire);
}

.champ .erreur {
  font-size: 0.875rem;
  color: var(--erreur);
  font-weight: 600;
}

.champ-piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.formulaire-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
}

.formulaire-note {
  font-size: 0.875rem;
  color: var(--texte-secondaire);
  max-width: 65ch;
}

.formulaire-note a {
  color: var(--sarcelle-fonce);
}

/* --------------------------------------------------------------------------
   12. Messages
   -------------------------------------------------------------------------- */
.message {
  border-radius: var(--rayon);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--bordure);
}

.message--erreur {
  background: #FEF3F2;
  border-color: #FDA29B;
  color: #7A271A;
}

.message--succes {
  background: #ECFDF3;
  border-color: #A6F4C5;
  color: #054F31;
}

.message h2,
.message h3 {
  color: inherit;
  margin-bottom: 0.5rem;
}

.message p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   13. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--encre);
  color: #D9E2EC;
  padding-block: 3rem 2rem;
  font-size: 0.925rem;
}

.site-footer a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.site-footer a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.footer-grille {
  display: grid;
  gap: 2rem;
}

.footer-marque {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-marque img {
  width: auto;
  height: 32px;
  filter: brightness(0) invert(1);
}

.footer-marque p {
  color: #BCCCDC;
  max-width: 42ch;
}

.footer-liens h2 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-liens ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.footer-liens a {
  display: inline-block;
  padding-block: 0.25rem;
}

.footer-bas {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: #9FB3C8;
  font-size: 0.85rem;
}

.footer-bas p {
  margin: 0;
}

@media (min-width: 768px) {
  .footer-grille {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
  }
}

/* --------------------------------------------------------------------------
   14. Pages secondaires
   -------------------------------------------------------------------------- */
.page-entete {
  padding-block: 3rem 2rem;
  background: var(--fond-alt);
  border-bottom: 1px solid var(--bordure);
}

.page-entete h1 {
  margin-bottom: 0.75rem;
}

.page-entete p {
  max-width: 65ch;
  color: var(--texte-secondaire);
}

.contenu-legal {
  max-width: 75ch;
}

.contenu-legal h2 {
  margin-top: 2.5rem;
  font-size: 1.35rem;
}

.contenu-legal h3 {
  margin-top: 1.75rem;
  font-size: 1.1rem;
}

.contenu-legal ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.contenu-legal li {
  margin-bottom: 0.35rem;
}

.marqueur {
  background: #FFF3CD;
  border: 1px dashed #B8893B;
  border-radius: var(--rayon-petit);
  padding: 0.15rem 0.4rem;
  font-size: 0.95em;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   15. 404 et pages d'état
   -------------------------------------------------------------------------- */
.etat-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding-block: 4rem;
  text-align: center;
}

.etat-page .container {
  max-width: 640px;
}

.etat-page h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
}

.etat-page p {
  font-size: 1.1rem;
  color: var(--texte-secondaire);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   MAJ-1 : classes remplaçant les styles en ligne, prix, formulaires
   -------------------------------------------------------------------------- */
.actions{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:center}
.titre-encadre{font-size:1.35rem}
.prix{margin:.25rem 0 .75rem}
.prix-mois{display:block;font-size:1.75rem;font-weight:800;color:var(--encre);line-height:1.2}
.prix-mois small{font-size:1rem;font-weight:600;color:var(--texte-secondaire)}
.prix-an{display:block;font-size:.9rem;color:var(--texte-secondaire)}
.form-alert{display:none;margin:0 0 1rem;padding:1rem 1.25rem;border-radius:var(--rayon-petit);background:#FEF3F2;border:1px solid #FDA29B;color:#7A271A;font-weight:600}
.form-alert:target{display:block}
.champ select,.champ textarea{width:100%}
.table-defile{overflow-x:auto}
.site-nav a.btn--primary,.site-nav a.btn--primary:hover{color:#fff;background:var(--sarcelle-fonce)}
.footer-marque img{background:#fff;padding:.5rem .75rem;border-radius:var(--rayon-petit);box-sizing:content-box;filter:none;align-self:flex-start;width:auto}
.tableau-prix{font-size:.95rem;width:100%;border-collapse:collapse;margin:1rem 0}
.tableau-prix th,.tableau-prix td{padding:.6rem .75rem;border-bottom:1px solid var(--bordure);text-align:left}
.tableau-prix th{color:var(--encre)}
.liste-points{padding-left:1.25rem}
.liste-points li{margin-bottom:.4rem}
.merci-bloc{max-width:640px;margin-inline:auto;text-align:center;padding-block:3rem}
