/* Solar — feuille de style du site vitrine (HTML / CSS / JavaScript, sans framework) */

/* Jetons de la charte Solar */
:root {
  --bleu: #0024a0;
  --bleu-fonce: #001a73;
  --bleu-clair: #e8ecf8;
  --soleil: #ffb400;
  --soleil-clair: #fff4d6;
  --nuit: #0b1033;
  --ardoise: #4a5270;
  --fond: #f4f6fb;
  --blanc: #ffffff;
  --erreur: #b91c1c;

  --font-titre: "Fraunces", Georgia, serif;
  --font-texte: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --rayon: 1rem;
  --largeur: 72rem;
  --etroit: 48rem;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--blanc);
  color: var(--nuit);
  font-family: var(--font-texte);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4,
.titre {
  font-family: var(--font-titre);
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

h4 {
  font-family: var(--font-texte);
  font-weight: 600;
  font-size: 1rem;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

.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;
}

.lien-evitement {
  position: absolute;
  left: -10000px;
  top: 0.5rem;
  z-index: 30;
  background: var(--blanc);
  padding: 0.5rem;
}

.lien-evitement:focus {
  left: 0.5rem;
}

/* ---------- Mise en page ---------- */
.conteneur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 4rem 1rem;
}

.conteneur--etroit {
  max-width: var(--etroit);
}

@media (min-width: 640px) {
  .conteneur {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.fond-gris {
  background: var(--fond);
}

.titre-section {
  font-size: 1.875rem;
  color: var(--bleu);
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .titre-section {
    font-size: 2.25rem;
  }
}

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

.petit {
  font-size: 0.875rem;
}

.grille {
  display: grid;
  gap: 1.5rem;
}

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

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

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

/* ---------- Boutons ---------- */
.bouton {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  background: var(--bleu);
  color: var(--blanc);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

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

.bouton:disabled {
  opacity: 0.6;
  cursor: wait;
}

.bouton--grand {
  font-size: 1.125rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.bouton--petit {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

@media (min-width: 640px) {
  .bouton--petit {
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
  }
}

.lien-secondaire {
  display: inline-block;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--bleu);
  text-decoration: none;
  text-underline-offset: 4px;
}

.lien-secondaire:hover {
  text-decoration: underline;
}

/* ---------- En-tête ---------- */
.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--blanc);
  border-bottom: 1px solid var(--bleu-clair);
}

.entete__barre {
  max-width: var(--largeur);
  margin: 0 auto;
  height: 4rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .entete__barre {
    padding: 0 1.5rem;
  }
}

.entete__logo img {
  width: 132px;
  height: auto;
}

/* ---------- Accroche ---------- */
.accroche {
  position: relative;
  overflow: hidden;
  background: var(--blanc);
}

.accroche__soleil {
  position: absolute;
  right: -6rem;
  top: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: var(--soleil-clair);
  pointer-events: none;
}

@media (min-width: 640px) {
  .accroche__soleil {
    width: 24rem;
    height: 24rem;
  }
}

.accroche__grille {
  position: relative;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1.5rem 1rem 3.5rem;
  display: grid;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 640px) {
  .accroche__grille {
    padding: 3.5rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .accroche__grille {
    grid-template-columns: 1.4fr 1fr;
  }
}

.accroche__texte > * + * {
  margin-top: 1.25rem;
}

.accroche h1 {
  font-size: 1.75rem;
  color: var(--bleu);
}

.accroche__sous-titre {
  color: var(--ardoise);
}

@media (min-width: 640px) {
  .accroche h1 {
    font-size: 3rem;
  }
  .accroche__sous-titre {
    font-size: 1.25rem;
  }
}

.accroche__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.accroche__visuel {
  display: none;
  justify-content: center;
}

.accroche__visuel img {
  width: 320px;
  height: auto;
}

@media (min-width: 1024px) {
  .accroche__visuel {
    display: flex;
  }
}

/* ---------- Cartes ---------- */
.carte {
  border-radius: var(--rayon);
  padding: 1.5rem;
}

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

.carte--bordure {
  border: 1px solid var(--bleu-clair);
}

.carte--bordure h3 {
  font-size: 1.25rem;
}

.carte__trait {
  display: block;
  width: 2.5rem;
  height: 0.375rem;
  border-radius: 999px;
  background: var(--soleil);
  margin-bottom: 0.75rem;
}

.carte--soleil {
  background: var(--soleil-clair);
}

.carte--soleil h3 {
  font-size: 1.125rem;
}

.coche {
  color: var(--bleu);
}

/* ---------- Reste à charge ---------- */
.rac {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .rac {
    grid-template-columns: 1fr 1fr;
  }
}

.rac__explication > * + * {
  margin-top: 1.25rem;
}

.rac__explication .titre-section {
  margin-bottom: 0;
}

.rac__intro {
  font-size: 1.125rem;
}

.formule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.pastille {
  border-radius: 999px;
  background: var(--blanc);
  padding: 0.25rem 0.75rem;
}

.pastille--soleil {
  background: var(--soleil);
}

.pastille--clair {
  display: inline-block;
  background: var(--soleil-clair);
  font-size: 0.875rem;
}

.exemple {
  margin: 0;
  border-radius: var(--rayon);
  background: var(--blanc);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 0 0 1px var(--bleu-clair);
}

.exemple figcaption {
  margin-bottom: 1rem;
}

.exemple figcaption > * + * {
  margin-top: 0.25rem;
}

.exemple dl {
  margin: 0;
}

.exemple dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--bleu-clair);
}

.exemple dl > div:first-child {
  border-top: 0;
}

.exemple dd {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.exemple .aide dd {
  color: var(--bleu);
}

.exemple .total {
  font-size: 0.875rem;
  color: var(--ardoise);
}

.exemple .total dd {
  font-weight: 400;
}

.exemple .reste {
  align-items: baseline;
  padding: 0.75rem 0;
}

.exemple .reste dt {
  font-family: var(--font-titre);
  font-weight: 900;
  font-size: 1.25rem;
}

.exemple .reste dd {
  font-family: var(--font-titre);
  font-weight: 900;
  font-size: 1.875rem;
  color: var(--bleu);
}

.mention {
  font-size: 0.875rem;
  color: var(--ardoise);
}

/* ---------- Solutions ---------- */
.solution {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: var(--rayon);
  background: var(--fond);
  padding: 1.5rem;
}

.solution h3 {
  font-size: 1.5rem;
  color: var(--bleu);
}

.solution h4 {
  margin-bottom: 0.25rem;
}

.puces {
  list-style: disc inside;
  color: var(--ardoise);
}

/* ---------- Étapes ---------- */
.etapes {
  background: var(--bleu);
  color: var(--blanc);
}

.etapes .titre-section {
  color: var(--blanc);
}

.etapes li > * + * {
  margin-top: 0.5rem;
}

.etapes h3 {
  font-size: 1.25rem;
}

.etapes p {
  color: rgb(255 255 255 / 0.9);
}

.numero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--soleil);
  color: var(--nuit);
  font-family: var(--font-titre);
  font-weight: 900;
  font-size: 1.125rem;
}

/* ---------- FAQ ---------- */
.faq {
  border-radius: var(--rayon);
  background: var(--blanc);
  box-shadow: 0 0 0 1px var(--bleu-clair);
}

.faq li + li {
  border-top: 1px solid var(--bleu-clair);
}

.faq h3 {
  font-family: var(--font-texte);
  font-size: 1rem;
  font-weight: 600;
}

.faq button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq__icone {
  font-size: 1.25rem;
  color: var(--bleu);
  transition: transform 0.2s ease;
}

.faq button[aria-expanded="true"] .faq__icone {
  transform: rotate(45deg);
}

.faq__reponse {
  padding: 0 1.25rem 1.25rem;
  color: var(--ardoise);
}

/* ---------- Formulaire ---------- */
.demande {
  scroll-margin-top: 5rem;
}

.demande .titre-section {
  margin-bottom: 0.5rem;
}

.demande__intro {
  margin-bottom: 2rem;
}

.formulaire > * + * {
  margin-top: 1.25rem;
}

.formulaire__grille {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .formulaire__grille {
    grid-template-columns: 1fr 1fr;
  }
}

.champ label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.requis {
  color: var(--erreur);
}

.facultatif {
  font-weight: 400;
  color: var(--ardoise);
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  border: 1px solid rgb(74 82 112 / 0.4);
  border-radius: 0.5rem;
  background: var(--blanc);
  color: var(--nuit);
  font: inherit;
  padding: 0.625rem 0.75rem;
}

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
  border-color: var(--bleu);
}

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

.erreur-champ {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--erreur);
}

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

.consentement {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.consentement input {
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  accent-color: var(--bleu);
}

.consentement label {
  font-size: 0.875rem;
}

.consentement a {
  font-weight: 600;
  color: var(--bleu);
}

.erreur-envoi {
  border-radius: 0.5rem;
  background: #fef2f2;
  padding: 1rem;
  font-weight: 500;
  color: #991b1b;
}

.formulaire .bouton {
  width: 100%;
  font-size: 1.125rem;
}

@media (min-width: 640px) {
  .formulaire .bouton {
    width: auto;
  }
}

.confirmation {
  border-radius: var(--rayon);
  background: var(--soleil-clair);
  padding: 2rem;
  text-align: center;
}

.confirmation__titre {
  font-family: var(--font-titre);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--bleu);
}

.confirmation p + p {
  margin-top: 0.5rem;
}

/* ---------- Pages légales ---------- */
.legal {
  max-width: var(--etroit);
  margin: 0 auto;
  padding: 3.5rem 1rem;
}

@media (min-width: 640px) {
  .legal {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.legal h1 {
  font-size: 2.25rem;
  color: var(--bleu);
}

.legal section {
  margin-top: 2rem;
}

.legal h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal p + p {
  margin-top: 0.5rem;
}

.legal a {
  color: var(--bleu);
}

/* ---------- Pied de page ---------- */
.pied {
  background: var(--bleu);
  color: var(--blanc);
  font-size: 0.875rem;
}

.pied__grille {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .pied__grille {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

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

.pied__marque > * + * {
  margin-top: 1rem;
}

.pied__marque img {
  width: 120px;
  height: auto;
}

.pied address {
  font-style: normal;
}

.pied address > * + * {
  margin-top: 0.25rem;
}

.pied__titre {
  font-family: var(--font-titre);
  font-weight: 900;
  font-size: 1.125rem;
}

.pied nav a {
  display: inline-block;
  padding: 0.375rem 0;
}

.pied__independance {
  margin-top: 1.5rem;
  color: rgb(255 255 255 / 0.9);
}
