/* Page d'achat du cheque cadeau national (cheques-cadeaux/page-nationale.php). Mobile d'abord.
   Palette, police et champs de l'ancienne page : marine #354d68, turquoise #23b8cd, Gilroy. */

.ccn {
  --marine: #1c317a; /* bleu de marque Recrea */
  --champ: #34478f;
  --turquoise: #23b8cd;
  --rouge: #ea5444; /* rouge du logo Recrea */
  --clair: #55d1f9; /* sur fond marine : texte marine dessus, jamais blanc */
  --gris: #a4afbb;
  --fond-clair: #eef6f8;
  background-color: #ffffff;
  color: var(--marine);
  font-family: "Gilroy", Arial, sans-serif;
  overflow-x: clip;
}

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

/* ------ Bassin : le haut de page ------ */
.ccn-bassin {
  position: relative;
  background-color: var(--marine);
  padding: 32px 20px 96px;
}

.ccn-bassin__inner {
  max-width: 1040px;
  margin: 0 auto;
}

.ccn-titre h1 {
  margin: 0;
  color: #ffffff;
  font-family: "Gilroy", Arial, sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  text-transform: none;
}

.ccn-titre {
  margin-bottom: 30px;
}

.ccn-titre h1 span {
  color: var(--clair);
}

.ccn-vague {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: 44px;
  fill: #ffffff;
}

/* ------ Etapes du formulaire : un module discret par etape ------ */
/* Le titre de l'etape est pose sur le contour */
.ccn-module {
  position: relative;
  margin-top: 0;
  padding: 30px 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
}

.ccn .ccn-etape {
  position: absolute;
  top: -14px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 8px;
  background-color: var(--marine);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.ccn-etape span {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--clair);
  color: var(--marine);
  font-size: 0.95rem;
  font-weight: 700;
}

/* ------ Visuel du cheque ------ */
.ccn-cheque {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.ccn-souche {
  perspective: 1000px;
}

.ccn-visuel {
  --ccn-rx: 0deg;
  --ccn-ry: 0deg;
  --ccn-lx: 50%;
  --ccn-ly: 30%;
  position: relative;
  margin: 0;
  container-type: inline-size;
  line-height: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--ccn-rx)) rotateY(var(--ccn-ry));
}

.ccn-visuel__reflet {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(circle at var(--ccn-lx) var(--ccn-ly), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.ccn-visuel img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 20px 5px rgba(0, 0, 0, 0.15);
}

/* Le symbole euro est imprime sur le visuel, seul le nombre change */
#montant_dans_theme {
  position: absolute;
  top: 14.5%;
  right: 18.5%;
  color: #ffffff;
  font-size: 13cqw;
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translateZ(30px);
  min-width: 1ch;
  padding: 0 4px;
  border-bottom: 2px dashed transparent;
  border-radius: 4px;
  outline: none;
  cursor: text;
  transition: border-color 0.2s ease-in-out;
}

#montant_dans_theme:hover,
#montant_dans_theme:focus {
  border-bottom-color: #ffffff;
}

.ccn-fleche {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  color: var(--marine);
  cursor: pointer;
  transform: translateZ(40px);
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.ccn-fleche:hover {
  background-color: var(--clair);
  color: var(--marine);
}

/* A cheval sur le bord : les fleches ne couvrent ni le texte ni le personnage du visuel */
.ccn-fleche--prec { left: -6px; }
.ccn-fleche--suiv { right: -6px; }

/* Chevron dessine sur le bouton : centre sur le rond, decale de 2px pour l'equilibre optique */
.ccn-fleche::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
}

.ccn-fleche--prec::before { transform: translateX(2px) rotate(-135deg); }
.ccn-fleche--suiv::before { transform: translateX(-2px) rotate(45deg); }

.ccn-propulse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  color: #ffffff;
  font-size: 0.85rem;
  line-height: 1;
}

.ccn-propulse img {
  width: auto;
  height: 50px;
}

.ccn-corps {
  padding-top: 34px;
}

/* ------ Montant ------ */
.ccn .ccn-montant {
  margin: 0 0 34px;
  min-width: 0;
  padding: 30px 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.ccn-montant legend,
.ccn-ligne label {
  padding: 0;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 6px;
}


.ccn-montant__choix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 74px));
  gap: 8px;
}

.ccn-tampon {
  position: relative;
  cursor: pointer;
}

.ccn-tampon input {
  position: absolute;
  opacity: 0;
}

.ccn-tampon span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border: 1px solid var(--gris);
  border-radius: 60px;
  background-color: var(--champ);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
}

.ccn-tampon input:checked + span {
  border-color: var(--clair);
  background-color: var(--clair);
  color: var(--marine);
  font-weight: 700;
}

.ccn-tampon input:focus-visible + span {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* Meme grille que De la part de / Pour : le champ a la taille de ces champs */
.ccn-montant__libre {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

#ccn-curseur {
  width: 100%;
  min-width: 0;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* Partie avant le point en bleu clair : --ccn-curseur est mis a jour par le script */
#ccn-curseur::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--clair) var(--ccn-curseur, 0%), var(--gris) var(--ccn-curseur, 0%));
}

#ccn-curseur::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: var(--gris);
}

#ccn-curseur::-moz-range-progress {
  height: 3px;
  border-radius: 2px;
  background: var(--clair);
}

#ccn-curseur::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7.5px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--clair);
}

#ccn-curseur::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--clair);
}

#ccn-curseur:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.ccn-montant__saisie {
  position: relative;
  display: block;
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
}

.ccn-montant__saisie span {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  pointer-events: none;
}

.ccn-montant__saisie input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--gris);
  border-radius: 6px;
  background-color: var(--champ);
  color: #ffffff;
  font: inherit;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}

.ccn-montant__saisie input::-webkit-outer-spin-button,
.ccn-montant__saisie input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ccn-montant__saisie input:focus {
  outline: none;
  border-color: var(--clair);
}

/* ------ De la part de, pour, message ------ */
.ccn-lignes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

/* Libelle dans le champ : il remonte en petit des que le champ est actif ou rempli */
.ccn-ligne {
  position: relative;
}

.ccn .ccn-ligne label {
  position: absolute;
  top: 16px;
  left: 13px;
  right: 13px;
  overflow: hidden;
  color: #dbe2e9;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: top 0.15s ease-out, font-size 0.15s ease-out;
}

.ccn .ccn-ligne input:focus + label,
.ccn .ccn-ligne input:not(:placeholder-shown) + label,
.ccn .ccn-ligne input:-webkit-autofill + label,
.ccn .ccn-ligne select + label {
  top: 7px;
  font-size: 0.72rem;
}

.ccn-ligne input,
.ccn-message textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--gris);
  border-radius: 6px;
  background-color: var(--champ);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
}

.ccn-ligne input {
  height: 52px;
  padding: 20px 12px 6px;
}

.ccn-message {
  margin-bottom: 0;
}

.ccn-message summary {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--clair);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
  list-style: none;
}

.ccn-message summary::-webkit-details-marker {
  display: none;
}

.ccn-message summary::before {
  content: "+ ";
  color: var(--clair);
  font-weight: 700;
}

.ccn-message[open] summary::before {
  content: "\2212  ";
}

.ccn-message textarea {
  margin-top: 10px;
  padding: 12px;
  resize: vertical;
}

.ccn-ligne input::placeholder,
.ccn-message textarea::placeholder {
  color: #dbe2e9;
  opacity: 1;
}

/* Preremplissage du navigateur : le fond clair impose rendrait le libelle illisible */
.ccn-ligne input:-webkit-autofill,
.ccn-ligne input:-webkit-autofill:hover,
.ccn-ligne input:-webkit-autofill:focus,
.ccn-ligne select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--champ) inset;
  box-shadow: 0 0 0 1000px var(--champ) inset;
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  transition: background-color 99999s ease-out;
}

.ccn-ligne input:focus,
.ccn-message textarea:focus {
  outline: none;
  border-color: var(--clair);
}

/* ------ Coordonnees et paiement dans la page ------ */
.ccn-coord,
.ccn-paiement,
.ccn-recap {
  animation: ccn-apparait 0.35s ease-out;
}

/* Etape coordonnees : les etapes 1 a 3 disparaissent, une seule colonne centree */
.ccn-suite .ccn-souche,
.ccn-suite .ccn-corps > .ccn-module:not(.ccn-coord):not(.ccn-paiement) {
  display: none;
}

.ccn-suite .ccn-corps {
  flex: 1 1 auto;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding-top: 0;
}

.ccn-recap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
  padding: 10px 14px 10px 10px;
  border-radius: 12px;
  background-color: var(--champ);
  color: #ffffff;
}

.ccn-recap[hidden] {
  display: none;
}

.ccn-recap img {
  flex: none;
  width: 92px;
  height: auto;
  border-radius: 6px;
}

.ccn-recap p {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

.ccn-recap strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
}

.ccn-recap button {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  text-decoration-color: var(--clair);
  text-underline-offset: 3px;
  cursor: pointer;
}

@keyframes ccn-apparait {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.ccn-coord[hidden],
.ccn-paiement[hidden],
.ccn-erreur[hidden] {
  display: none;
}

.ccn-coord__civilite {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 14px;
}

.ccn-coord__civilite label,
.ccn-coord__cgv {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #ffffff;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Le reset du site retire l'apparence native des cases */
.ccn-coord__civilite input,
.ccn-coord__cgv input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  -webkit-appearance: auto;
  appearance: auto;
  accent-color: var(--clair);
}

.ccn-coord__large {
  margin-bottom: 14px;
}

.ccn-coord__ville {
  grid-template-columns: 2fr 3fr;
}

.ccn-ligne select {
  display: block;
  width: 100%;
  height: 52px;
  padding: 20px 34px 6px 12px;
  border: 1px solid var(--gris);
  border-radius: 6px;
  background: var(--champ) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none;
  appearance: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
}

/* Liste deroulante : fond blanc explicite, sinon le telephone reprend le fond bleu du champ */
.ccn-ligne select option {
  background-color: #ffffff;
  color: var(--marine);
}

.ccn-coord__note {
  margin: -6px 0 16px;
  color: #dbe2e9;
  font-size: 0.85rem;
}

.ccn-coord__cgv a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: var(--clair);
  text-underline-offset: 3px;
}

.ccn-promo {
  display: flex;
  gap: 10px;
}

.ccn-promo input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 12px;
  border: 1px solid var(--gris);
  border-radius: 6px;
  background-color: var(--champ);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
}

.ccn-promo input::placeholder {
  color: #dbe2e9;
  opacity: 1;
}

.ccn-promo button {
  flex: none;
  padding: 0 16px;
  border: 1px solid var(--clair);
  border-radius: 6px;
  background: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.ccn-promo__message {
  min-height: 1.2em;
  margin: 8px 0 12px;
  color: var(--clair);
  font-size: 0.9rem;
}

/* Rouge eclairci : le rouge Recrea n'est pas assez lisible en texte sur le fond bleu */
.ccn-promo__message--erreur {
  color: #ff9b8f;
}

.ccn-promo input.ccn-promo--erreur {
  border: 2px solid #ff9b8f;
}

.ccn-erreur {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background-color: #ffffff;
  color: #c0392b;
  font-size: 0.95rem;
  line-height: 1.35;
}

.ccn-paiement__recap {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 0.95rem;
}

.ccn-paiement__recap div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ccn-paiement__recap dt {
  flex: none;
  color: #dbe2e9;
}

.ccn-paiement__recap dd {
  min-width: 0;
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

/* Message : texte long, sous son libelle et avec ses retours a la ligne */
.ccn-paiement__recap .ccn-paiement__message {
  display: block;
}

.ccn-paiement__message dd {
  margin-top: 4px;
  font-weight: 400;
  text-align: left;
  white-space: pre-line;
}

.ccn-paiement__recap .ccn-paiement__total {
  padding-top: 12px;
  border-bottom: 0;
  font-size: 1.15rem;
}

.ccn-paiement__recap .ccn-paiement__total dt,
.ccn-paiement__recap .ccn-paiement__total dd {
  color: #ffffff;
  font-weight: 700;
}

#ccn-paiement-widget {
  padding: 12px;
  border-radius: 10px;
  background-color: #ffffff;
  color: #333333;
}

/* ------ Modale des conditions ------ */
.ccn-modale {
  margin: auto;
  width: min(800px, calc(100vw - 24px));
  height: min(86vh, 900px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background-color: #ffffff;
  color: var(--marine);
}

.ccn-modale[open] {
  display: flex;
  flex-direction: column;
}

.ccn-modale::backdrop {
  background-color: rgba(28, 49, 122, 0.6);
}

.ccn-modale__tete {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #dfe5ea;
  font-size: 1.05rem;
}

.ccn-modale__tete button {
  padding: 8px 16px;
  border: 0;
  border-radius: 30px;
  background-color: var(--marine);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

/* Onglets CGV / CGU et mentions legales */
.ccn-modale__onglets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ccn-modale .ccn-modale__onglet {
  padding: 8px 14px;
  border: 1px solid var(--marine);
  background-color: #ffffff;
  color: var(--marine);
}

.ccn-modale .ccn-modale__onglet[aria-selected="true"] {
  background-color: var(--marine);
  color: #ffffff;
}

.ccn-modale .ccn-modale__onglet:focus-visible {
  outline: 2px solid var(--clair);
  outline-offset: 2px;
}

.ccn-modale__texte[hidden] {
  display: none;
}

.ccn-modale__corps {
  flex: 1;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  background-color: #f1f5f9;
  font-size: 0.95rem;
}

.ccn-modale__corps p {
  margin: 0;
}

/* Texte des CGV saisi dans PILOTE : mise en forme neutre et lisible */
.ccn-modale__texte {
  padding: 20px;
  border-radius: 8px;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.5;
}

.ccn .ccn-modale__texte h1,
.ccn .ccn-modale__texte h2,
.ccn .ccn-modale__texte h3,
.ccn .ccn-modale__texte h4 {
  margin: 1.2em 0 0.5em;
  color: var(--marine);
  font-family: "Gilroy", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  text-transform: none;
}

.ccn .ccn-modale__texte > :first-child {
  margin-top: 0;
}

.ccn-modale__texte p,
.ccn-modale__texte ul,
.ccn-modale__texte ol {
  margin: 0 0 0.8em;
}

.ccn-modale__texte ul,
.ccn-modale__texte ol {
  padding-left: 1.3em;
  list-style: disc;
}

.ccn-modale__texte ol {
  list-style: decimal;
}

.ccn-modale__texte li {
  display: list-item;
  margin-bottom: 0.3em;
}

.ccn-modale__texte a {
  color: var(--marine);
  text-decoration: underline;
}

.ccn-modale__pdf {
  flex: none;
  padding: 10px 18px;
  border-top: 1px solid #dfe5ea;
  color: var(--marine);
  font-size: 0.9rem;
  text-align: center;
}

/* ------ Bouton d'achat ------ */
.ccn-offrir {
  margin-top: 26px;
}

/* Halo blanc qui pulse doucement, repris du bouton du quiz de la page abonnements */
.ccn-offrir,
.ccn-barre button {
  animation: ccn-halo 2.4s ease-out infinite;
}

@keyframes ccn-halo {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  }

  70%,
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}

.ccn-offrir,
.ccn-fin__bouton {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--clair);
  border-radius: 30px;
  background-color: var(--clair);
  color: var(--marine);
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.ccn-offrir:hover,
.ccn-fin__bouton:hover {
  background-color: #ffffff;
  color: var(--marine);
}

.ccn-rassure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  color: #ffffff;
  font-size: 0.85rem;
  line-height: 1.2;
}

.ccn-rassure img {
  width: 18px;
  height: 18px;
}

/* ------ Services ------ */
.ccn-services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 24px;
  list-style: none;
}

.ccn-services li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.ccn-services strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1.05rem;
  font-weight: 700;
}

.ccn-services img {
  flex: none;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Logo Recrea plus large qu'une icone : meme hauteur, largeur a ses proportions */
.ccn-services img.ccn-services__recrea {
  width: 62px;
}

/* ------ Carte de France ------ */
.ccn-carte {
  max-width: 992px;
  margin: 20px 16px;
  padding: 28px 20px;
  border-radius: 16px;
  background-color: #f1f5f9;
}

/* Logo sous la carte, centre */
.ccn-carte__visuel {
  position: relative;
  max-width: 340px;
  margin: 36px auto 0;
}

.ccn-carte__logo {
  display: block;
  width: auto;
  height: 48px;
  margin: 18px auto 0;
}

.ccn-carte__texte p {
  margin: 16px 0 22px;
  font-size: 1.1rem;
  line-height: 1.45;
}

.ccn-recherche__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

.ccn-recherche {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.ccn-recherche__champ {
  display: block;
  flex: 1 1 150px;
  max-width: 240px;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 2px solid var(--marine);
  border-radius: 30px;
  background-color: #ffffff;
  color: var(--marine);
  font-family: inherit;
  font-size: 1rem;
}

.ccn-recherche__champ:focus {
  outline: none;
  border-color: var(--turquoise);
}

.ccn-recherche__moi {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--marine);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--marine);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.ccn-recherche__moi:hover {
  color: var(--marine);
}

.ccn-recherche__resultats p {
  margin: 24px 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.ccn-recherche__resultats ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ccn-recherche__resultats li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background-color: #ffffff;
}

.ccn-centre__logo {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  background-color: var(--marine);
  color: #ffffff;
  font-weight: 700;
}

.ccn-centre__logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  object-fit: cover;
}

.ccn-centre__infos {
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.2;
}

.ccn-centre__infos strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ccn-carte__france {
  display: block;
  width: 100%;
}

.ccn-carte__terre {
  fill: var(--marine);
  stroke: var(--marine);
  stroke-width: 14;
  stroke-linejoin: round;
}

.ccn-carte__point {
  fill: var(--rouge);
  stroke: #ffffff;
  stroke-width: 3;
}

.ccn-carte__point--proche {
  fill: #ffffff;
  stroke: var(--rouge);
  stroke-width: 7;
  r: 15px;
}

/* ------ Ce qu'on peut en faire ------ */
.ccn-usages {
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 20px;
}

.ccn h2 {
  margin: 0 0 14px;
  color: var(--marine);
  font-family: "Gilroy", Arial, sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  text-transform: none;
}

.ccn-usages__intro {
  font-size: 1rem;
  margin: 0 0 24px;
  line-height: 1.45;
}

/* Bandeau de photos, sur toute la largeur de l'ecran */
/* Defilement automatique seulement : on ne le fait pas glisser au doigt */
.ccn-defile {
  width: 100vw;
  margin: 0 0 0 calc(50% - 50vw);
  padding: 12px 0 16px;
  overflow-x: hidden;
  scrollbar-width: none;
}

.ccn-defile::-webkit-scrollbar {
  display: none;
}

.ccn-defile__piste {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ccn-defile__piste li {
  flex: none;
  width: 220px;
}

.ccn-defile__photo {
  position: relative;
  height: 300px;
  transition: transform 0.25s ease-out;
}

.ccn-defile__piste li:hover .ccn-defile__photo {
  transform: translateY(-6px);
}

.ccn-defile__piste p {
  margin: 14px 2px 0;
  color: var(--marine);
  font-size: 0.9rem;
  line-height: 1.4;
}

.ccn-defile__piste img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  pointer-events: none;
}

/* Nom de la categorie : etiquette inclinee qui deborde de la photo, une fois a gauche, une fois a droite */
.ccn-defile__piste span {
  position: absolute;
  left: -12px;
  bottom: 22px;
  z-index: 1;
  padding: 7px 14px;
  border-radius: 6px;
  background-color: var(--clair);
  color: var(--marine);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-4deg);
}

.ccn-defile__piste li:nth-child(even) span {
  left: auto;
  right: -12px;
  bottom: auto;
  top: 26px;
  background-color: var(--marine);
  color: #ffffff;
  transform: rotate(3deg);
}

/* ------ FAQ : memes titres et memes cartes que le reste de la page ------ */
.ccn-faq .faq {
  margin: 0;
  padding: 44px 0 64px;
  text-align: left;
}

.ccn-faq .faq__header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.ccn-faq .faq__header h2 {
  margin-bottom: 8px;
  text-align: left;
}

.ccn-faq .faq__header p {
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.35;
  text-align: left;
}

.ccn-faq .faq_all_dropdown {
  display: grid;
  gap: 12px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.ccn-faq .faq__dropdown {
  margin: 0;
  border-radius: 12px;
  background-color: var(--fond-clair);
}

.ccn-faq .faq__dropdown__title,
.ccn-faq .faq__dropdown__title:hover,
.ccn-faq .faq__dropdown__title.active {
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--marine);
  transition: color 0.2s ease-in-out;
}

.ccn-faq .faq__dropdown__title:hover {
  color: var(--marine);
}

.ccn-faq .faq__dropdown h3 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  text-transform: none;
}

.ccn-faq .faq__dropdown__title img,
.ccn-faq .faq__dropdown__title:hover img {
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: 12px;
  filter: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Le plus tourne et devient une croix */
.ccn-faq .ccn-ouvert .faq__dropdown__title img {
  transform: rotate(135deg);
}

/* La reponse s'ouvre a sa hauteur reelle */
.ccn-faq .faq__dropdown__text--hidden {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.35s ease-in-out, opacity 0.3s ease-in-out;
}

.ccn-faq .ccn-ouvert .faq__dropdown__text--hidden {
  grid-template-rows: 1fr;
  opacity: 1;
}

.ccn-faq .faq__dropdown .link {
  color: var(--marine);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--marine);
  text-underline-offset: 3px;
}

.ccn-faq .faq__dropdown p {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0 16px;
  background: none;
  color: var(--marine);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  transition: padding-bottom 0.35s ease-in-out;
}

.ccn-faq .faq__dropdown.ccn-ouvert p {
  padding-bottom: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .ccn-merci .ccn-visuel {
    animation: none;
  }

  .ccn-offrir,
  .ccn-barre button {
    animation: none;
  }

  .ccn-faq .faq__dropdown__text--hidden,
  .ccn-faq .faq__dropdown p,
  .ccn-faq .faq__dropdown__title img {
    transition: none;
  }
}

/* ------ Fin de page ------ */
.ccn-fin {
  position: relative;
  padding: 84px 20px 60px;
  background-color: var(--marine);
  color: #ffffff;
  text-align: center;
}

.ccn-fin .ccn-vague {
  top: -1px;
  bottom: auto;
  transform: scaleY(-1);
}

.ccn-fin p {
  max-width: 560px;
  margin: 0 auto 26px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.ccn-fin__bouton {
  width: auto;
  max-width: 340px;
  margin: 0 auto;
}

/* ------ Page de remerciement ------ */
.ccn-merci .ccn-offrir {
  margin-top: 24px;
}

.ccn-merci__grille {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ccn-merci__texte {
  color: #ffffff;
}

.ccn-merci .ccn-titre {
  margin-bottom: 16px;
}

.ccn-merci__texte p {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.45;
}

.ccn-merci__texte strong {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ccn-merci__autre {
  display: block;
  margin-top: 16px;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: var(--clair);
  text-underline-offset: 3px;
}

.ccn-merci__autre:hover {
  color: var(--clair);
}

.ccn-merci .ccn-visuel {
  animation: ccn-merci-flotte 7s ease-in-out infinite;
}

@keyframes ccn-merci-flotte {
  0%,
  100% {
    transform: rotateX(2deg) rotateY(-5deg);
  }

  50% {
    transform: rotateX(-2deg) rotateY(5deg);
  }
}

.ccn-merci__infos {
  margin: 22px 0 0;
  color: #ffffff;
  font-size: 0.95rem;
}

.ccn-merci__infos div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ccn-merci__infos dt {
  flex: none;
  color: #dbe2e9;
}

.ccn-merci__infos dd {
  min-width: 0;
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

.ccn-merci__suite {
  box-sizing: content-box;
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.ccn-merci__suite h2 {
  margin: 0 0 24px;
  color: var(--marine);
  font-family: "Gilroy", Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: left;
  text-transform: none;
}

.ccn-merci__suite ol {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ccn-merci__suite li {
  position: relative;
  min-height: 40px;
  padding-left: 54px;
  font-size: 1rem;
  line-height: 1.4;
}

.ccn-merci__suite li span {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--clair);
  color: var(--marine);
  font-weight: 700;
}

.ccn-merci__suite strong {
  display: block;
  font-weight: 700;
}

@media screen and (min-width: 900px) {
  .ccn-merci__grille {
    flex-direction: row;
    align-items: center;
    gap: 56px;
  }

  .ccn-merci__texte,
  .ccn-merci__cheque {
    flex: 1 1 0;
    min-width: 0;
  }

  .ccn-merci__suite ol {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* ------ Barre d'achat mobile ------ */
.ccn-barre {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background-color: var(--marine);
  color: #ffffff;
  font-family: "Gilroy", Arial, sans-serif;
  font-weight: 700;
  transform: translateY(110%);
  transition: transform 0.2s ease-in-out;
}

.ccn-barre--visible {
  transform: none;
}

/* Cheque pas encore personnalise : pas de montant, le bouton seul */
.ccn-barre--vierge > span {
  display: none;
}

.ccn-barre--vierge button {
  width: 100%;
}

.ccn-barre button {
  padding: 11px 22px;
  border: 0;
  border-radius: 30px;
  background-color: var(--clair);
  color: var(--marine);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

/* Mobile : De la part de et Pour l'un sous l'autre, pour lire le libelle en entier */
@media screen and (max-width: 899px) {
  .ccn-lignes:not(.ccn-coord__nom):not(.ccn-coord__ville) {
    grid-template-columns: 1fr;
  }
}

/* ------ Ordinateur : un vrai cheque, a l'horizontale ------ */
@media screen and (min-width: 900px) {
  .ccn-bassin {
    padding: 76px 24px 120px;
  }

  .ccn-titre {
    margin-bottom: 40px;
  }

  .ccn-titre h1 {
    max-width: 860px;
    font-size: 2.6rem;
  }

  .ccn-fleche--prec { left: -12px; }
  .ccn-fleche--suiv { right: -12px; }

  .ccn-vague {
    height: 70px;
  }

  .ccn-cheque {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }

  .ccn-souche {
    flex: 0 0 48%;
    min-width: 0;
    padding: 34px 22px 22px;
  }

  .ccn-corps {
    flex: 1;
    min-width: 0;
    padding-top: 0;
  }

  .ccn-services {
    grid-template-columns: repeat(4, 1fr);
    padding: 56px 24px 32px;
    gap: 28px;
  }

  .ccn-usages {
    padding: 72px 24px;
  }

  .ccn-carte {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    margin: 40px auto;
    padding: 44px 48px;
  }

  .ccn-carte__visuel {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .ccn h2 {
    font-size: 2rem;
  }

  .ccn-faq .faq__header,
  .ccn-faq .faq_all_dropdown {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Deux colonnes : la FAQ prend deux fois moins de hauteur */
  .ccn-faq .faq_all_dropdown {
    grid-template-columns: 1fr 1fr;
  }

  .ccn-defile__piste li { width: 290px; }
  .ccn-defile__photo { height: 400px; }
  .ccn-defile__piste p { font-size: 0.95rem; }
  .ccn-defile__piste span { font-size: 1.35rem; padding: 9px 18px; }

  .ccn-fin p {
    font-size: 2rem;
  }

  /* Etapes 4 et 5 sur toute la largeur : moins haut */
  .ccn-suite .ccn-corps {
    max-width: none;
  }

  .ccn-coord {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px 24px;
    align-items: end;
    padding: 32px 22px 22px;
  }

  .ccn-coord__civilite {
    grid-column: 1 / -1;
    margin: 0;
  }

  /* A gauche l'identite et l'adresse, a droite l'e-mail et le code promo */
  .ccn-coord .ccn-lignes,
  .ccn-coord__large,
  .ccn-promo {
    margin: 0;
  }

  .ccn-coord__nom     { grid-column: 1 / 4; grid-row: 2; }
  .ccn-coord__adresse { grid-column: 1 / 4; grid-row: 3; }
  .ccn-coord__ville   { grid-column: 1 / 4; grid-row: 4 / 6; align-self: start; }
  .ccn-coord__email   { grid-column: 4 / -1; grid-row: 2; }
  .ccn-coord__confirm { grid-column: 4 / -1; grid-row: 3; }
  .ccn-promo          { grid-column: 4 / -1; grid-row: 5; }

  .ccn-promo__message {
    grid-column: 4 / -1;
    grid-row: 6;
    margin: -6px 0 0;
  }

  .ccn-promo__message:empty {
    display: none;
  }

  .ccn-coord__note {
    grid-column: 4 / -1;
    grid-row: 4;
    margin: -6px 0 0;
  }

  .ccn-coord__cgv {
    grid-column: 1 / -1;
    grid-row: 7;
  }

  .ccn-paiement {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 28px;
    align-items: start;
    padding: 32px 22px 22px;
  }

  .ccn-paiement__recap {
    margin: 0;
  }

  .ccn-barre {
    display: none;
  }
}

/* ------ Mini sites (templates/cheques-cadeaux/) ------ */
/* Bleu sous le menu fixe du site ; la hauteur exacte est posee par le script de la page */
.ccn-mini-site {
  padding-top: 100px;
  background-color: #1c317a;
}

/* Marges que les templates posent sur les champs (body input[type=text]...), sans toucher aux regles de cette feuille */
.ccn-mini-site .ccn :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="search"], select) {
  margin: 0;
  box-shadow: none;
}

/* Pied de page des templates : sa marge haute laissait une bande blanche sous le bleu de la page */
body:has(.ccn-mini-site) #footer {
  margin-top: 0;
}

/* Page plus courte que l'ecran : le bloc de contenu du template s'etire, en bleu comme la fin de page */
body:has(.ccn-mini-site) #content {
  background-color: #1c317a;
}

/* Champs : memes bordures, marges et retraits que la page nationale, devant les regles generales des templates
   (body input[type=text], body textarea). Genere depuis les regles des champs ci-dessus. */
.ccn-mini-site .ccn-tampon input:checked + span {
  border-color: var(--clair);
}

.ccn-mini-site .ccn-montant__saisie input {
  padding: 0 36px 0 12px;
  border: 1px solid var(--gris);
  border-radius: 6px;
}

.ccn-mini-site .ccn-montant__saisie input:focus {
  border-color: var(--clair);
}

.ccn-mini-site .ccn-ligne input,
.ccn-mini-site .ccn-message textarea {
  border: 1px solid var(--gris);
  border-radius: 6px;
}

.ccn-mini-site .ccn-ligne input {
  padding: 20px 12px 6px;
}

.ccn-mini-site .ccn-message textarea {
  margin-top: 10px;
  padding: 12px;
}

.ccn-mini-site .ccn-ligne input:focus,
.ccn-mini-site .ccn-message textarea:focus {
  border-color: var(--clair);
}

.ccn-mini-site .ccn-coord__civilite input,
.ccn-mini-site .ccn-coord__cgv input {
  margin: 1px 0 0;
}

.ccn-mini-site .ccn-promo input {
  padding: 0 12px;
  border: 1px solid var(--gris);
  border-radius: 6px;
}

.ccn-mini-site .ccn-promo input.ccn-promo--erreur {
  border: 2px solid #ff9b8f;
}
