/**
 * Page « Guides » (contenu CMS enveloppé dans .cg-guides) – MyWebShop, 10/2026
 * Chargé sur les pages CMS via config/theme.yml (assets > css > cms).
 * Maquette : Figma « HOME - ABO - GUIDE », page CMS / GUIDES + compléments PDF client.
 * Tout est préfixé .cg-guides / .cg-modal : aucun effet sur les autres pages CMS.
 */

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/guides/baloo2-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/guides/nunitosans-latin.woff2") format("woff2");
}

.cg-guides,
.cg-modal {
  --cg-navy: #23284a;
  --cg-blue: #2d3c86;
  --cg-blue-light: #4a56c4;
  --cg-text: #4a4f6e;
  --cg-muted: #6e6a8c;
  --cg-muted-2: #5e6390;
  --cg-soft: #8a8fb0;
  --cg-eyebrow: #a6a0c8;
  --cg-lilac: #eff0fb;
  --cg-lilac-2: #f3f2fc;
  --cg-border: #f0eff6;
  --cg-orange: #f6a30d;
  --cg-orange-dark: #b07b3a;
  --cg-sand: #fbf1e0;
  --cg-sand-border: #f6d9a8;
  --cg-cream: #fbfaf6;
  --cg-green: #3f9a6a;
  --cg-red: #b23f28;
  --cg-radius: 18px;
  --cg-font-title: "Baloo 2", "Gluten", sans-serif;
  --cg-font-text: "Nunito Sans", "Open Sans", sans-serif;
  font-family: var(--cg-font-text);
  color: var(--cg-text);
}

/* ----- Intégration dans la page CMS native ----- */

/* Le hero porte le vrai H1 : on masque le titre natif « Guides » de cette page seulement */
#main:has(.cg-guides) > .page-header {
  display: none;
}

.page-content.page-cms:has(.cg-guides) {
  padding: 0;
  text-align: left;
  background: transparent;
}

#wrapper:has(.cg-guides) {
  background: #fff;
}

/* La page a son propre bloc newsletter : pas de bande #footer-newsletter (son chien passe dans .cg-newsletter) */
body:has(.cg-guides) #footer-newsletter {
  display: none;
}

body:has(.cg-guides) #footer {
  padding-top: 0;
}

#wrapper:has(.cg-guides) {
  padding-bottom: 40px;
}

/* Remise à zéro des styles CMS du thème à l'intérieur du bloc */
#content .cg-guides :where(ul) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cg-guides :where(p),
.cg-modal :where(p) {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.cg-guides h1,
.cg-guides h2,
.cg-guides h3,
.cg-modal .cg-modal__title {
  margin: 0;
  font-family: var(--cg-font-title);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cg-navy);
}

.cg-guides :where(img) {
  display: block;
  max-width: 100%;
  height: auto;
}

.cg-guides a:hover,
.cg-guides a:focus {
  text-decoration: none;
}

.cg-guides > div + div {
  margin-top: 56px;
}

/* Cibles des ancres internes : ne pas finir sous le menu */
.cg-guides [id] {
  scroll-margin-top: 90px;
}

/* ----- Éléments communs ----- */

.cg-badge {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.cg-badge--orange { background: var(--cg-orange); color: var(--cg-navy); }
.cg-badge--blue { background: var(--cg-lilac); color: var(--cg-blue); }
.cg-badge--sand { background: var(--cg-sand); color: var(--cg-orange-dark); }

.cg-eyebrow {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cg-eyebrow);
}

.cg-section-head {
  margin-bottom: 28px;
  text-align: center;
}

.cg-guides .cg-section-title {
  margin-top: 6px;
  font-size: 26px;
}

.cg-section-text {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--cg-soft);
}

.cg-btn,
.cg-guides a.cg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 22px;
  border: 0;
  border-radius: 14px;
  font-family: var(--cg-font-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}

.cg-btn:hover { transform: translateY(-1px); }

:is(.cg-guides, .cg-modal) .cg-btn--primary { background: var(--cg-blue); color: #fff; }
:is(.cg-guides, .cg-modal) .cg-btn--primary:hover { background: var(--cg-navy); color: #fff; }
:is(.cg-guides, .cg-modal) .cg-btn--orange { background: var(--cg-orange); color: var(--cg-navy); }
:is(.cg-guides, .cg-modal) .cg-btn--orange:hover { background: #e39505; color: var(--cg-navy); }
:is(.cg-guides, .cg-modal) .cg-btn--soft { background: var(--cg-lilac-2); color: var(--cg-blue); }
:is(.cg-guides, .cg-modal) .cg-btn--soft:hover { background: var(--cg-lilac); color: var(--cg-navy); }
:is(.cg-guides, .cg-modal) .cg-btn--sm { padding: 11px 18px; font-size: 14px; }

/* Icône de téléchargement (posée par le CSS, rien dans le contenu BO) */
.cg-download::before,
.cg-card__gate::before,
.cg-gate__link::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("../img/guides/telecharger.svg") center / contain no-repeat;
  mask: url("../img/guides/telecharger.svg") center / contain no-repeat;
}

/* PDF pas encore en ligne : bouton neutralisé par guides.js */
.cg-guides .cg-download.is-soon,
.cg-guides .cg-download.is-soon:hover {
  background: var(--cg-lilac-2);
  color: var(--cg-soft);
  cursor: default;
  transform: none;
}

.cg-download.is-soon::before {
  display: none;
}

.cg-link {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 800;
  color: var(--cg-blue);
  text-decoration: underline;
  cursor: pointer;
}

/* ----- Hero ----- */

.cg-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 22px;
  border-radius: 24px;
  background: linear-gradient(125deg, var(--cg-blue) 0%, var(--cg-blue-light) 100%);
  color: #d9dcf2;
}

.cg-hero::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: -29px;
  width: 110px;
  height: 96px;
  background: url("../img/guides/patte.svg") center / contain no-repeat;
  opacity: .1;
  transform: rotate(16deg);
}

/* #content-wrapper : custom.css impose « .page-cms #content-wrapper img { height: auto } » */
#content-wrapper .cg-guides .cg-hero__photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right top;
  opacity: .2;
}

.cg-hero__body {
  position: relative;
  max-width: 680px;
}

.cg-hero .cg-badge {
  padding: 9px 16px;
  font-size: 15px;
}

.cg-guides .cg-hero__title {
  margin-top: 16px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.05;
  color: #fff !important; /* custom.css du site force h1-h6 en #283688 !important */
}

.cg-hero__text {
  margin-top: 16px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.6;
}

.cg-hero__text strong { font-weight: 900; color: #fff; }

#content .cg-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 20px;
}

.cg-hero__facts li {
  font-size: 14px;
  font-weight: 700;
  color: #eaecfb;
}

.cg-hero__facts strong { font-weight: 900; color: #fff; }
.cg-hero__icon { margin-right: 8px; font-size: 20px; line-height: 1; vertical-align: -3px; }

/* ----- Case e-mail du guide du chiot (sous le hero) ----- */

.cg-guides > .cg-gate-box {
  margin-top: 20px;
  padding: 18px 20px;
  border: 2px solid var(--cg-sand-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 50px -34px rgba(246, 163, 13, .55);
}

/* ----- Tous les guides (grille filtrable) ----- */

.cg-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  margin-bottom: 24px;
  border-top: 1px solid #eee5d6;
  border-bottom: 1px solid #eee5d6;
}

.cg-chip {
  padding: 9px 16px;
  border: 2px solid #e8e1d3;
  border-radius: 999px;
  background: #fff;
  font-family: var(--cg-font-text);
  font-size: 14px;
  font-weight: 800;
  color: var(--cg-blue);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}

.cg-chip:hover { border-color: var(--cg-blue); }

.cg-chip.is-active {
  border-color: var(--cg-blue);
  background: var(--cg-blue);
  color: #fff;
}

.cg-filters__count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--cg-soft);
}

#content .cg-cards {
  display: grid;
  gap: 16px;
}

.cg-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 2px solid var(--cg-border);
  border-radius: var(--cg-radius);
  background: #fff;
}

.cg-card[hidden] { display: none; }

.cg-card__cover {
  display: flex;
  flex: none;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 84px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: var(--cg-lilac);
}

#content-wrapper .cg-guides .cg-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cg-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.cg-card__theme {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cg-eyebrow);
}

.cg-guides .cg-card__title {
  margin-top: 2px;
  font-size: 18px;
}

.cg-card__subtitle {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 800;
  color: var(--cg-blue);
}

.cg-card__text {
  margin: 6px 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--cg-muted);
}

.cg-card__body .cg-btn {
  width: 232px;
  max-width: 100%;
  margin-top: auto;
}

/* ----- Contenu long (guides lisibles en ligne) ----- */

/* Chaque guide lisible en ligne est une fiche distincte du reste de la page */
.cg-article {
  padding: 26px 18px 22px;
  border: 2px solid var(--cg-border);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 30px 60px -50px rgba(45, 60, 134, .6);
  scroll-margin-top: 90px;
}

.cg-guides .cg-article__title {
  margin-top: 12px;
  font-size: 27px;
}

.cg-article__title + .cg-lead {
  padding-bottom: 22px;
  border-bottom: 2px dashed var(--cg-border);
}

.cg-guides .cg-article__subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 14px;
  font-size: 21px;
}

.cg-article__subtitle::before {
  content: "";
  flex: none;
  width: 6px;
  height: 22px;
  border-radius: 3px;
  background: var(--cg-orange);
}

.cg-article__back {
  margin-top: 22px;
  text-align: center;
}

.cg-article__back .cg-link { font-size: 14px; }

.cg-lead {
  margin-top: 12px;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.75;
}

.cg-lead strong { font-weight: 700; }

#content .cg-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.cg-tile,
.cg-tile a {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--cg-muted);
}

.cg-tile {
  padding: 18px;
  border-radius: var(--cg-radius);
  background: var(--cg-cream);
}

.cg-tile__icon {
  display: block;
  margin-bottom: 4px;
  font-size: 26px;
  line-height: 1;
}

.cg-tile__title {
  display: block;
  margin-bottom: 3px;
  font-family: var(--cg-font-title);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--cg-blue);
}

.cg-tiles--outline .cg-tile {
  padding: 0;
  border: 2px solid var(--cg-border);
  background: #fff;
  transition: border-color .2s;
}

.cg-tiles--outline .cg-tile:hover { border-color: #d8dcf2; }
.cg-tiles--outline .cg-tile a { height: 100%; padding: 16px 18px; }

/* Tuile-lien : flèche vers le rayon */
.cg-tiles--outline .cg-tile__title::after {
  content: "→";
  margin-left: 6px;
  color: var(--cg-orange);
  transition: margin .2s;
}

.cg-tiles--outline .cg-tile:hover .cg-tile__title::after { margin-left: 10px; }

.cg-tiles--lilac .cg-tile {
  background: var(--cg-lilac);
  font-size: 14px;
  color: var(--cg-text);
}

.cg-tiles--lilac .cg-tile__title { font-weight: 800; }

/* Jauge de niveau sous le titre des routines (1, 2 puis 3 tiers) */
.cg-tiles--lilac .cg-tile { --cg-level: 33.4%; }
.cg-tiles--lilac .cg-tile:nth-child(2) { --cg-level: 66.7%; }
.cg-tiles--lilac .cg-tile:nth-child(3) { --cg-level: 100%; }

.cg-tiles--lilac .cg-tile__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 6px;
  margin: 6px 0 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cg-blue) var(--cg-level), #d8dcf2 0);
}

#content .cg-steps {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.cg-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  border: 2px solid var(--cg-border);
  border-radius: var(--cg-radius);
  background: #fff;
}

.cg-step__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 22px;
}

.cg-step__icon--green { background: #eaf2ec; }
.cg-step__icon--blue { background: var(--cg-lilac); }
.cg-step__icon--orange { background: var(--cg-sand); }

.cg-step__title {
  display: block;
  font-family: var(--cg-font-title);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cg-navy);
}

.cg-step p {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--cg-muted-2);
}

/* Étapes ordonnées : frise numérotée, sans cadre */
#content .cg-steps--numbered {
  gap: 0;
  counter-reset: cg-step;
}

.cg-steps--numbered .cg-step {
  position: relative;
  padding: 0 0 24px;
  border: 0;
  background: transparent;
  counter-increment: cg-step;
}

.cg-steps--numbered .cg-step:last-child { padding-bottom: 0; }
.cg-steps--numbered .cg-step > div { padding-top: 2px; }

.cg-steps--numbered .cg-step::before {
  content: counter(cg-step);
  position: absolute;
  z-index: 1;
  top: -7px;
  left: 31px;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--cg-orange);
  font: 800 11px/18px var(--cg-font-text);
  text-align: center;
  color: var(--cg-navy);
}

.cg-steps--numbered .cg-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 52px;
  bottom: 6px;
  left: 22px;
  width: 2px;
  border-radius: 1px;
  background: var(--cg-sand-border);
}

.cg-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 17px 21px;
  border: 1px solid var(--cg-sand-border);
  border-radius: 16px;
  background: #fff7ea;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  color: #8a6a2e;
}

.cg-alert__icon { flex: none; font-size: 22px; }

.cg-compare {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.cg-compare__col {
  padding: 22px 24px;
  border-radius: var(--cg-radius);
}

.cg-compare__col--ok { background: #eaf5ef; color: #3e5a48; }
.cg-compare__col--ko { background: #fdeee9; color: #8a4433; }

.cg-compare__title {
  display: block;
  margin-bottom: 10px;
  font-family: var(--cg-font-title);
  font-size: 18px;
  font-weight: 700;
}

.cg-compare__col--ok .cg-compare__title { color: #2d5a3d; }
.cg-compare__col--ko .cg-compare__title { color: var(--cg-red); }

#content .cg-compare ul {
  padding-left: 18px;
  list-style: disc;
}

.cg-compare li {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

.cg-compare .cg-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: #2d5a3d;
}

.cg-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
  padding: 24px;
  border-radius: 22px;
  background: var(--cg-blue);
  color: #d9dcf2;
}

.cg-cta--sand {
  background: var(--cg-sand);
  color: #8a7a5e;
}

.cg-cta__icon { font-size: 34px; line-height: 1; }

.cg-cta__text {
  flex: 1 1 200px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.cg-cta__title {
  display: block;
  margin-bottom: 2px;
  font-family: var(--cg-font-title);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.cg-cta--sand .cg-cta__title { color: var(--cg-orange-dark); }
.cg-cta .cg-btn { flex: 1 1 100%; }

/* ----- Rayons boutique ----- */

#content .cg-shop__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 18px;
}

.cg-shop__list li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 9px);
}

.cg-shop__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--cg-navy);
}

.cg-shop__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--cg-lilac);
  box-shadow: 0 12px 26px -16px rgba(45, 60, 134, .5);
  transition: transform .25s;
}

.cg-shop__item:hover img { transform: scale(1.04); }
.cg-guides .cg-shop__item:hover { color: var(--cg-blue); }

/* ----- FAQ (collapse Bootstrap natif du thème) ----- */

.cg-faq {
  max-width: 856px;
  margin-right: auto;
  margin-left: auto;
}

.cg-faq__item {
  overflow: hidden;
  border: 2px solid #efedf6;
  border-radius: var(--cg-radius);
  background: #fff;
  transition: background-color .2s, border-color .2s;
}

.cg-faq__item + .cg-faq__item { margin-top: 12px; }

.cg-faq__item.is-open {
  border-color: #d8dcf2;
  background: #f8f9fe;
}

.cg-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: none;
  font-family: var(--cg-font-title);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  color: var(--cg-navy);
  cursor: pointer;
}

.cg-faq__question::after {
  content: "+";
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--cg-lilac-2);
  font-size: 20px;
  color: var(--cg-blue);
}

.cg-faq__item.is-open .cg-faq__question::after {
  content: "−";
  background: var(--cg-blue);
  color: #fff;
}

.cg-faq__answer p {
  padding: 0 20px 20px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--cg-muted-2);
}

/* ----- Blog ----- */

#content .cg-blog__list {
  display: grid;
  gap: 20px;
}

.cg-post {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 40px -28px rgba(45, 60, 134, .5);
}

.cg-post__media {
  position: relative;
  display: block;
  background: var(--cg-lilac);
}

.cg-post__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cg-post__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 13px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 12px -4px rgba(45, 60, 134, .4);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--cg-blue);
}

.cg-post__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.cg-post__title {
  font-family: var(--cg-font-title);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cg-navy);
}

.cg-post__text {
  margin: 8px 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--cg-soft);
}

.cg-post__more {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cg-blue);
}

.cg-blog__all {
  margin-top: 28px;
  text-align: center;
}

/* ----- Newsletter (bloc de page + pop-up) ----- */

.cg-newsletter {
  padding: 28px 20px;
  border-radius: 24px;
  background: #fff7ef;
  text-align: center;
}

.cg-guides .cg-newsletter__title { font-size: 24px; color: var(--cg-blue); }

.cg-newsletter { position: relative; }

.cg-newsletter__text {
  margin: 6px 0 18px;
  font-size: 14.5px;
  font-weight: 600;
}

.cg-nl-form {
  text-align: left;
}

/* Textes source lus par guides.js (le BO refuse <form>/<input> dans un contenu CMS) */
.cg-nl-form__label,
.cg-nl-form__button {
  display: none;
}

.cg-nl-form__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cg-newsletter .cg-nl-form__fields,
.cg-newsletter .cg-nl-form__legal {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
}

.cg-nl-form__fieldlabel {
  display: block;
  text-align: left; /* le thème aligne les label à droite */
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cg-navy);
}

.cg-nl-form__input {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 2px solid #eadfc7;
  border-radius: 13px;
  background: #fffdf9;
  font-family: var(--cg-font-text);
  font-size: 16px; /* 16 px : évite le zoom auto d'iOS */
  font-weight: 700;
  color: var(--cg-navy);
}

.cg-nl-form__input:focus {
  border-color: var(--cg-blue);
  outline: 0;
}

.cg-nl-form.is-invalid .cg-nl-form__input {
  border-color: var(--cg-red);
}

.cg-nl-form .cg-btn { width: 100%; }

.cg-nl-form__error,
.cg-nl-form__success {
  display: none;
}

.cg-nl-form.is-invalid .cg-nl-form__error {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cg-red);
}

.cg-nl-form__legal {
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--cg-muted);
}

.cg-nl-form__legal a {
  color: var(--cg-blue);
  text-decoration: underline;
}

.cg-nl-form.is-sent .cg-nl-form__fields,
.cg-nl-form.is-sent .cg-nl-form__error,
.cg-nl-form.is-sent .cg-nl-form__legal {
  display: none;
}

.cg-nl-form.is-sent .cg-nl-form__success {
  display: block;
  padding: 64px 0 4px;
  background: url("../img/guides/coche.svg") center top / 52px no-repeat;
  font-family: var(--cg-font-title);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: var(--cg-navy);
}

/* Guide offert contre l'e-mail : lien révélé après inscription */
.cg-gate__access { display: none; }

.cg-gate .cg-nl-form__fieldlabel {
  font-size: 13px;
  font-weight: 700;
  color: #8a7a5e;
}

.cg-nl-form.cg-gate.is-sent .cg-nl-form__success {
  padding: 0 0 0 30px;
  background: url("../img/guides/coche.svg") left center / 22px no-repeat;
  font-size: 16px;
  text-align: left;
}

.cg-gate.is-sent .cg-gate__access {
  display: block;
  margin-top: 12px;
}

.cg-gate__link { width: 100%; }

.cg-cta--gate .cg-gate { flex: 1 1 100%; }

/* Dans le bloc de fin d'article, le texte du bloc tient lieu de libellé (gardé pour les lecteurs d'écran) */
.cg-cta--gate .cg-nl-form__fieldlabel {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Pop-up : modal Bootstrap native, habillée */
.cg-modal .modal-dialog {
  max-width: 420px;
  margin: 60px auto;
  padding: 0 16px;
}

.cg-modal .modal-content {
  padding: 30px 24px 22px;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 30px 60px -20px rgba(35, 40, 74, .45);
}

.cg-modal .cg-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 28px;
  font-weight: 400;
  color: var(--cg-navy);
  opacity: .8;
}

.cg-modal .cg-modal__title {
  padding-right: 24px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.cg-modal__text {
  margin: 10px 0 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.cg-modal__dismiss {
  margin-top: 14px;
  text-align: center;
}

.cg-modal__dismiss .cg-link {
  font-size: 14px;
  font-weight: 700;
}

.cg-modal.is-sent .cg-modal__title,
.cg-modal.is-sent .cg-modal__text {
  display: none;
}

.cg-modal.is-sent .cg-modal__dismiss .cg-link {
  padding: 10px 26px;
  border: 2px solid var(--cg-blue);
  border-radius: 999px;
  text-decoration: none;
}

/* ----- Couleur des liens -----
 * custom.css du site impose « #cms #content-wrapper a { color: rgb(26, 150, 212) !important } »
 * sur toutes les pages CMS : seul un !important plus spécifique rend leur couleur aux composants de la page. */

#cms #content-wrapper .cg-guides .cg-btn--primary { color: #fff !important; }
#cms #content-wrapper .cg-guides .cg-btn--orange,
#cms #content-wrapper .cg-guides .cg-gate__link { color: var(--cg-navy) !important; }
#cms #content-wrapper .cg-guides .cg-btn--soft,
#cms #content-wrapper .cg-guides .cg-link,
#cms #content-wrapper .cg-guides .cg-nl-form__legal a { color: var(--cg-blue) !important; }
#cms #content-wrapper .cg-guides .cg-download.is-soon { color: var(--cg-soft) !important; }
#cms #content-wrapper .cg-guides .cg-tile a { color: var(--cg-muted) !important; }
#cms #content-wrapper .cg-guides .cg-shop__item,
#cms #content-wrapper .cg-guides .cg-post { color: var(--cg-navy) !important; }
#cms #content-wrapper .cg-guides .cg-compare .cg-link { color: #2d5a3d !important; }

/* ----- Tablette (≥ 576 px) ----- */

@media (min-width: 576px) {
  .cg-cta .cg-btn { flex: 0 0 auto; }

  .cg-nl-form__fields {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cg-nl-form__fieldlabel { flex: 1 1 100%; margin-bottom: -4px; }
  .cg-nl-form__input { flex: 1 1 200px; }
  .cg-nl-form .cg-btn { flex: 0 0 auto; width: auto; }
  .cg-modal .cg-nl-form .cg-btn { flex: 1 1 100%; }

  #content .cg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* 4 tuiles : 2 × 2, puis une ligne en desktop (jamais de tuile orpheline) */
  #content .cg-tiles:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-compare { grid-template-columns: 1fr 1fr; }
  #content .cg-shop__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cg-shop__list li:last-child:nth-child(odd) { grid-column: auto; width: auto; }
}

/* ----- Tablette large (≥ 768 px) ----- */

@media (min-width: 768px) {
  .cg-guides > div + div { margin-top: 72px; }
  .cg-guides > .cg-gate-box { margin-top: 24px; padding: 22px 28px; }

  .cg-hero { padding: 44px 40px; }
  #content-wrapper .cg-guides .cg-hero__photo { left: 35%; width: 65%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
  .cg-guides .cg-hero__title { font-size: 42px; }
  .cg-hero__text { font-size: 17px; }

  #content .cg-cards { grid-template-columns: 1fr 1fr; }

  .cg-guides .cg-section-title { font-size: 30px; }
  .cg-guides .cg-article__title { font-size: 34px; }
  .cg-guides .cg-article__subtitle { font-size: 24px; }
  .cg-lead { font-size: 16px; }
  .cg-step { padding: 20px 22px; }
  .cg-steps--numbered .cg-step { padding: 0 0 26px; }
  .cg-article { padding: 40px 44px 30px; border-radius: 30px; }

  .cg-cta { padding: 26px 30px; }
  .cg-newsletter { padding: 40px; }
  .cg-guides .cg-newsletter__title { font-size: 28px; }

  #content .cg-blog__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ----- Desktop (≥ 992 px) ----- */

@media (min-width: 992px) {
  .cg-hero { padding: 52px; border-radius: 28px; }
  .cg-hero .cg-badge { padding: 10px 20px; font-size: 18px; }
  #content-wrapper .cg-guides .cg-hero__photo { left: 45%; width: 55%; }
  .cg-guides .cg-hero__title { font-size: 50px; }

  #content .cg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #content .cg-tiles:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #content .cg-shop__list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 50px; }

  .cg-faq__question { padding: 19px 22px; font-size: 17px; }
  .cg-faq__answer p { padding: 0 22px 21px; }

  .cg-cta--gate .cg-gate { flex: 0 1 380px; }

  .cg-newsletter { padding: 52px 40px; }
  .cg-guides .cg-newsletter__title { font-size: 32px; }

  .cg-newsletter::before {
    content: "";
    position: absolute;
    bottom: 28px;
    left: 48px;
    width: 190px;
    height: 176px;
    background: url("../img/chien-footer.png") left bottom / contain no-repeat;
  }
}

/* ----- Place réservée aux formulaires (recette du 16/11/2026) -----
   guides.js construit les champs (.cg-nl-form__fields) après le premier affichage : sans réservation, le contenu
   en dessous sautait de 50 à 160 px (décalage de mise en page CLS de 0,15 à 0,23). Hauteurs mesurées des champs
   construits ; la réservation disparaît dès que les champs existent. */
.cg-guides .cg-nl-form:not(:has(.cg-nl-form__fields))::before { content: ""; display: block; height: 140px; }
.cg-guides .cg-gate-box .cg-nl-form:not(:has(.cg-nl-form__fields))::before { height: 160px; }
.cg-guides .cg-cta .cg-nl-form:not(:has(.cg-nl-form__fields))::before { height: 104px; }
@media (min-width: 576px) {
  .cg-guides .cg-nl-form:not(:has(.cg-nl-form__fields))::before,
  .cg-guides .cg-gate-box .cg-nl-form:not(:has(.cg-nl-form__fields))::before { height: 78px; }
  .cg-guides .cg-cta .cg-nl-form:not(:has(.cg-nl-form__fields))::before { height: 52px; }
}
