/* =====================================================================
   CGV.CSS : styles de la page cgv.html (Conditions générales de vente)
   Elle utilise aussi CSS/style.css et CSS/prestations.css (cadres "ta-cadre", titre "ta-hero").

   Sur ordinateur : sommaire à gauche (il reste visible quand on fait défiler), articles à droite.
   Sur téléphone  : le sommaire devient une rangée de pastilles qu'on fait glisser du doigt,
                    et chaque article s'ouvre / se ferme au toucher (+ / –).
   ===================================================================== */

/* ----- Mise en page : sommaire + articles ----- */
.cg-grille {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* ----- Sommaire ----- */
.cg-sommaire {
  position: sticky;
  top: 16px;                   /* reste collé en haut quand on fait défiler */
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 14px;
}

.cg-sommaire strong {
  font-size: 1rem;
  margin: 0 0 6px 8px;
}

.cg-sommaire a {
  font-size: 0.92rem;
  line-height: 1.3;
  color: #3b1f63;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
}

.cg-sommaire a:hover,
.cg-sommaire a:focus-visible {
  background: #fff;
  color: #810ece;
  font-weight: 700;
}

/* ----- Les articles ----- */
.cg-articles {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* on arrive sur un article par le sommaire : un peu d'espace au-dessus */
.cg-article {
  scroll-margin-top: 16px;
}

.cg-article summary {
  list-style: none;            /* pas de petit triangle */
  cursor: default;
}

.cg-article summary::-webkit-details-marker {
  display: none;
}

.cg-article h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: "Roboto", sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: #1e1b2e;
}

/* le numéro dans un rond dégradé violet -> bleu */
.cg-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #810ece, #35b8f5);
  color: #fff;
  font-size: 0.95rem;
}

.cg-article p,
.cg-article li {
  line-height: 1.65;
}

.cg-article ul {
  padding-left: 20px;
  margin-bottom: 0.5rem;
}

/* ----- Deux colonnes : animations / soins ----- */
.cg-deux {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 6px 0 10px;
}

.cg-deux > div {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  padding: 12px 14px;
}

.cg-deux h3 {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

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

/* couleurs des deux parties du site */
.cg-art { color: #810ece; }
.cg-be  { color: #0b6f78; }

/* ----- Tableaux (paiement, annulation) ----- */
.cg-tableau {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 10px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.95rem;
}

.cg-tableau th,
.cg-tableau td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 1px solid #e9e4f3;
}

.cg-tableau th {
  background: #f3eefb;
}

/* ----- Formulaire de rétractation (modèle légal) ----- */
.cg-formulaire {
  border: 2px dashed #810ece;
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  line-height: 1.8;
}

/* ⚠ Informations à compléter (surlignées en jaune), comme sur les mentions légales */
.a-completer {
  background: #fff3b0;
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 700;
  color: #5c4400;
}

/* =====================================================================
   TÉLÉPHONE ET PETITE TABLETTE (moins de 768 px)
   ===================================================================== */
@media (max-width: 767.98px) {
  .cg-grille {
    grid-template-columns: 1fr;
  }

  /* sommaire = rangée de pastilles qu'on fait glisser du doigt */
  .cg-sommaire {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding: 10px;
    top: 0;
    z-index: 5;
    scrollbar-width: none;
  }

  .cg-sommaire::-webkit-scrollbar {
    display: none;
  }

  .cg-sommaire strong {
    display: none;
  }

  /* l'article visé s'arrête sous la rangée de pastilles (collée en haut), pas dessous */
  .cg-article {
    scroll-margin-top: 70px;
  }

  .cg-sommaire a {
    flex: none;
    background: #fff;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
  }

  .cg-sommaire .cg-court {
    display: none;   /* le numéro et les mots longs du sommaire sont cachés sur téléphone */
  }

  /* chaque article s'ouvre au toucher, avec + / – à droite */
  .cg-article summary {
    cursor: pointer;
  }

  .cg-article h2 {
    margin: 0;
    font-size: 1.05rem;
  }

  .cg-article summary h2::after {
    content: "+";
    margin-left: auto;
    color: #810ece;
    font-size: 1.4rem;
  }

  .cg-article[open] summary h2::after {
    content: "–";
  }

  .cg-article[open] summary {
    margin-bottom: 10px;
  }

  .cg-deux {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   IMPRESSION (bouton "Imprimer cette page") : seulement le texte des CGV
   ===================================================================== */
@media print {
  menu-site,
  bas-de-page,
  .cg-sommaire,
  .cg-imprimer {
    display: none !important;
  }

  body {
    background: none !important;
  }

  .cg-grille {
    display: block;
  }

  .ta-cadre {
    box-shadow: none !important;
    border: 1px solid #ccc;
    break-inside: avoid;
    background: #fff !important;
  }
}
