/* Entre deux pas — Phase 4.2 identité éditoriale (matin / soir) */

:root {
  --cdq-ink: #2c241c;
  --cdq-navy: #2a3550;
  --cdq-morning-ink: #3a2a1a;
  --cdq-evening-ink: #243044;
  --cdq-peach: #f6e8d8;
  --cdq-ivory: #fbf6ef;
  --cdq-cream: #f3e6d4;
  --cdq-dusk-a: #e8ecf5;
  --cdq-dusk-b: #d5dceb;
  --cdq-plum: #5a4a72;
  --cdq-line-soft: rgba(60, 40, 20, 0.1);
  --cdq-radius: 22px;
  --cdq-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --cdq-font-ui: "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* —— Carte pensée (éditoriale, pas admin) —— */
.cdq-edp {
  position: relative;
  overflow: hidden;
  border-radius: var(--cdq-radius);
  padding: 1.55rem 1.5rem 1.35rem;
  margin: 0;
  font-family: var(--cdq-font-ui);
  color: var(--cdq-ink);
  border: 0;
  box-shadow: none;
  isolation: isolate;
  max-width: 40rem;
}

.cdq-edp__glow,
.cdq-edp__path,
.cdq-edp__motif {
  pointer-events: none;
  z-index: 0;
}

.cdq-edp__glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(28px);
}

.cdq-edp__path {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 12%;
  height: 48%;
  opacity: 0.14;
  background:
    radial-gradient(ellipse 80% 40% at 20% 80%, transparent 40%, currentColor 41%, transparent 42%),
    radial-gradient(ellipse 90% 50% at 70% 40%, transparent 55%, currentColor 56%, transparent 57%);
}

.cdq-edp__motif {
  position: absolute;
  right: 0.85rem;
  top: 0.85rem;
  opacity: 0.12;
  transform: scale(1.8);
}

.cdq-edp__header,
.cdq-edp__quote,
.cdq-edp__actions,
.cdq-edp__tagline,
.cdq-edp__previous,
.cdq-edp__library-link,
.cdq-why {
  position: relative;
  z-index: 1;
}

.cdq-edp__brand {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

.cdq-edp__slot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cdq-edp__slot-icon {
  display: inline-flex;
  color: currentColor;
  opacity: 0.9;
}

.cdq-edp__quote {
  margin: 1.35rem 0 1rem;
  padding: 0;
  border: 0;
}

.cdq-edp__text {
  margin: 0;
  font-family: var(--cdq-font-display);
  font-size: clamp(1.22rem, 2.6vw, 1.55rem);
  line-height: 1.48;
  font-weight: 500;
  text-wrap: pretty;
}

.cdq-edp__guillemet {
  font-weight: 400;
  opacity: 0.45;
  padding: 0 0.12em;
}

.cdq-edp__tagline {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.72;
  font-style: italic;
  max-width: 34ch;
}

.cdq-edp__actions {
  margin-top: 0.35rem;
}

/* Matin — ivoire / pêche / soleil */
.cdq-edp--morning {
  color: var(--cdq-morning-ink);
  background:
    linear-gradient(155deg, #fffaf4 0%, var(--cdq-ivory) 38%, var(--cdq-peach) 100%);
}
.cdq-edp--morning .cdq-edp__glow {
  background: radial-gradient(circle, rgba(232, 168, 98, 0.45), transparent 70%);
}
.cdq-edp--morning .cdq-edp__path {
  color: #c9894a;
}
.cdq-edp--morning .cdq-edp__brand {
  color: #8a5a28;
}
.cdq-edp--morning .cdq-edp__slot {
  color: #6b4320;
}
.cdq-edp--morning::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  top: 3.35rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(138, 90, 40, 0.28), transparent 85%);
  z-index: 1;
}

/* Soir — bleu / prune doux */
.cdq-edp--evening {
  color: var(--cdq-evening-ink);
  background:
    linear-gradient(160deg, #f4f5fb 0%, var(--cdq-dusk-a) 42%, #e0dcea 100%);
}
.cdq-edp--evening .cdq-edp__glow {
  background: radial-gradient(circle, rgba(110, 100, 160, 0.35), transparent 70%);
  inset: auto auto -10% -15%;
}
.cdq-edp--evening .cdq-edp__path {
  color: #5a4a72;
  opacity: 0.12;
  transform: scaleX(-1);
}
.cdq-edp--evening .cdq-edp__brand {
  color: var(--cdq-plum);
  letter-spacing: 0.22em;
}
.cdq-edp--evening .cdq-edp__slot {
  color: #2a3550;
}
.cdq-edp--evening .cdq-edp__text {
  font-style: italic;
  font-weight: 450;
}
.cdq-edp--evening::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  top: 3.35rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(90, 74, 114, 0.25), transparent 85%);
  z-index: 1;
}

/* —— Citation (identité distincte) —— */
.cdq-cite {
  margin: 0.75rem 0;
  padding: 1.15rem 1.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.16);
  border-left: 3px solid var(--cdq-navy);
  font-family: var(--cdq-font-ui);
  box-shadow: none;
}

.cdq-cite__brand {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cdq-navy);
}

.cdq-cite__quote {
  margin: 0.75rem 0 0.5rem;
  padding: 0;
  border: 0;
}

.cdq-cite__text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--cdq-ink);
  font-weight: 500;
}

.cdq-cite__author {
  margin: 0;
  font-style: italic;
  font-size: 0.92rem;
  color: rgba(30, 58, 95, 0.85);
}

.cdq-cite__source {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
}

.cdq-cite__source a {
  color: inherit;
}

/* —— Why today (stylé, a11y native) —— */
.cdq-why {
  margin: 0.85rem 0 0;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  padding: 0;
  overflow: hidden;
}

.cdq-why__summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.88rem;
  list-style: none;
  padding: 0.7rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cdq-why__summary::-webkit-details-marker {
  display: none;
}

.cdq-why__summary::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.7;
  transition: transform 160ms ease;
  flex-shrink: 0;
}

.cdq-why[open] .cdq-why__summary::before {
  transform: rotate(45deg);
}

.cdq-why__body {
  padding: 0 0.9rem 0.85rem;
}

.cdq-why__title {
  margin: 0 0 0.25rem;
  font-weight: 650;
  font-size: 0.92rem;
}

.cdq-why__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0.9;
}

.cdq-why__more {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
}

/* —— Garder —— */
.cdq-cite__actions {
  margin-top: 0.75rem;
}

.cdq-keep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  min-width: 44px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(60, 40, 20, 0.16);
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.cdq-keep:hover {
  background: rgba(255, 255, 255, 0.88);
}

.cdq-keep:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.cdq-keep.is-kept {
  border-color: rgba(155, 45, 74, 0.35);
  color: #9b2d4a;
  background: rgba(255, 240, 245, 0.85);
}

.cdq-keep-login {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
}

.cdq-edp__previous {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 0.65rem;
}

.cdq-edp__previous summary {
  cursor: pointer;
  font-weight: 600;
  color: inherit;
  opacity: 0.88;
  list-style: none;
}

.cdq-edp__previous summary::-webkit-details-marker {
  display: none;
}

.cdq-edp__previous-body {
  margin-top: 0.45rem;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  font-family: var(--cdq-font-display);
  line-height: 1.45;
}

.cdq-edp__library-link {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.cdq-edp__library-link a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.85;
}

/* —— Home shell (flag public) —— */
.cdq-home {
  margin: 1rem 0 1.25rem;
}

.cdq-home__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .cdq-home__grid {
    grid-template-columns: 1.25fr 1fr;
    align-items: start;
  }
}

.cdq-home__skeleton {
  min-height: 9.5rem;
  border-radius: var(--cdq-radius);
  background: linear-gradient(165deg, #f7f3ec, #efe8dc);
  border: 1px solid var(--cdq-line-soft);
  padding: 1.25rem;
}

.cdq-home__sk-line {
  height: 0.85rem;
  border-radius: 6px;
  background: rgba(30, 58, 95, 0.1);
  margin-top: 0.65rem;
}

.cdq-home__sk-line--brand {
  width: 40%;
  height: 0.55rem;
  margin-top: 0;
}

.cdq-home__sk-line--short {
  width: 65%;
}

.cdq-home.is-hydrated .cdq-home__skeleton {
  display: none;
}

.cdq-home__noscript {
  margin: 0;
  padding: 1rem;
  opacity: 0.8;
}

.cdq-home-pilot {
  margin: 1rem 0 1.25rem;
  max-width: 40rem;
}

/* —— Library —— */
.cdq-lib {
  font-family: var(--cdq-font-ui);
  color: var(--cdq-ink);
  max-width: 920px;
  margin: 0 auto;
}

.cdq-lib__title {
  font-family: var(--cdq-font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 0.35rem;
}

.cdq-lib__lead {
  margin: 0 0 1.25rem;
  opacity: 0.8;
}

.cdq-lib__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.cdq-lib__tab {
  font: inherit;
  font-weight: 650;
  font-size: 0.88rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--cdq-line-soft);
  background: #fff;
  cursor: pointer;
  color: var(--cdq-navy);
}

.cdq-lib__tab[aria-selected="true"] {
  background: var(--cdq-navy);
  color: #fff;
  border-color: var(--cdq-navy);
}

.cdq-lib__tab:focus-visible {
  outline: 2px solid var(--cdq-navy);
  outline-offset: 2px;
}

.cdq-lib__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cdq-lib__toolbar select {
  font: inherit;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--cdq-line-soft);
}

.cdq-lib__month {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cdq-navy);
  border-bottom: 1px solid var(--cdq-line-soft);
  padding-bottom: 0.25rem;
}

.cdq-lib__grid {
  display: grid;
  gap: 0.85rem;
}

.cdq-lib__empty {
  padding: 2rem 1rem;
  text-align: center;
  opacity: 0.8;
  background: var(--cdq-ivory);
  border-radius: var(--cdq-radius);
  border: 1px dashed var(--cdq-line-soft);
}

.cdq-lib__meta {
  font-size: 0.78rem;
  opacity: 0.7;
  margin: 0.35rem 0 0;
}

.cdq-lib__remove {
  margin-top: 0.5rem;
  font: inherit;
  font-size: 0.82rem;
  background: transparent;
  border: 0;
  color: #8a3a4a;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.cdq-lib__remove:focus-visible {
  outline: 2px solid var(--cdq-navy);
  outline-offset: 2px;
}

/* —— Rankings —— */
.cdq-rank {
  font-family: var(--cdq-font-ui);
  max-width: 820px;
  margin: 0 auto;
}

.cdq-rank__title {
  font-family: var(--cdq-font-display);
  margin: 0 0 0.35rem;
}

.cdq-rank__lead {
  margin: 0 0 1.25rem;
  opacity: 0.8;
}

.cdq-rank__section {
  margin-bottom: 2rem;
}

.cdq-rank__section-title {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--cdq-navy);
}

.cdq-rank__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.cdq-rank__item {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--cdq-ivory);
  border: 1px solid var(--cdq-line-soft);
}

.cdq-rank__medal {
  font-size: 1.25rem;
  line-height: 1;
}

.cdq-rank__votes {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
}

.cdq-rank__empty {
  opacity: 0.75;
  font-size: 0.92rem;
}

/* —— Inspiration du jour (pensée + citation) —— */
.cdq-inspire {
  width: 100%;
  max-width: none;
  margin: 1rem 0 1.25rem;
  box-sizing: border-box;
}

.cdq-inspire__header {
  margin: 0 0 0.75rem;
}

.cdq-inspire__kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5a4a3a;
  opacity: 0.85;
}

.cdq-inspire__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 780px) {
  .cdq-inspire__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1.15rem;
  }
  .cdq-inspire--home:not(.is-pilot) .cdq-inspire__grid {
    grid-template-columns: 1fr;
    max-width: 36rem;
  }
}

.cdq-inspire__thought,
.cdq-inspire__quote {
  min-width: 0;
}

.cdq-inspire__thought .cdq-edp {
  height: 100%;
  max-width: none;
  margin: 0;
}

.cdq-inspire__library {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
}

.cdq-inspire__library a {
  color: #2a3550;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Espace membre : section pleine largeur */
.cdm-quote.cdq-member--pilot,
.cdm-wrap > .cdq-inspire {
  max-width: none;
  margin: 0.35rem 0 1.35rem;
  padding: 0;
  width: 100%;
}

.cdm-quote.cdq-member--pilot .cdq-edp {
  width: 100%;
  max-width: none;
}

/* Carte Citation — identité distincte (pas matin/soir) */
.cdq-cite-panel {
  position: relative;
  height: 100%;
  box-sizing: border-box;
  padding: 1.35rem 1.3rem 1.15rem;
  border-radius: 20px;
  background:
    linear-gradient(165deg, #ffffff 0%, #f5f7fb 55%, #eef2f8 100%);
  color: #243044;
  font-family: var(--cdq-font-ui);
  overflow: hidden;
}

.cdq-cite-panel::before {
  content: "«";
  position: absolute;
  right: 0.85rem;
  top: 0.35rem;
  font-family: var(--cdq-font-display);
  font-size: 4rem;
  line-height: 1;
  opacity: 0.08;
  pointer-events: none;
}

.cdq-cite-panel__header {
  position: relative;
  z-index: 1;
  margin: 0 0 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(36, 48, 68, 0.1);
}

.cdq-cite-panel__brand {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: #3d4d72;
}

.cdq-cite-panel__slot {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #2a3550;
}

.cdq-cite-panel__body {
  position: relative;
  z-index: 1;
}

.cdq-cite-panel .cdq {
  margin: 0;
}

.cdq-cite-panel .cdq__quote {
  font-family: var(--cdq-font-display);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.45;
  font-weight: 500;
  color: #243044;
}

.cdq-cite-panel .cdq__author {
  font-style: italic;
  opacity: 0.9;
}

.cdq-cite-panel .cdq__author::before {
  content: "— ";
}

.cdq-rotator--editorial .cdq-rotator__toolbar {
  justify-content: flex-start;
  margin-top: 0.85rem;
  gap: 0.35rem;
}

.cdq-rotator--editorial .cdq-rotator__btn--icon {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(36, 48, 68, 0.16);
  background: rgba(255, 255, 255, 0.75);
  color: #2a3550;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cdq-rotator--editorial .cdq-rotator__btn--icon:hover {
  background: #fff;
}

.cdq-rotator--editorial .cdq-rotator__btn--icon:focus-visible {
  outline: 2px solid #2a3550;
  outline-offset: 2px;
}

.cdq-inspire--home {
  margin: 1.25rem 0 1rem;
}

.cdq-inspire--home .cdq-edp {
  padding: 1.35rem 1.3rem 1.15rem;
}

@media (max-width: 779px) {
  .cdq-inspire__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .cdq-edp {
    padding: 1.2rem 1.1rem 1.1rem;
    border-radius: 18px;
  }
  .cdq-edp__text {
    font-size: 1.12rem;
  }
  .cdq-keep {
    width: 100%;
  }
  .cdq-cite-panel {
    padding: 1.15rem 1.05rem;
  }
  .cdq-edp--morning::after,
  .cdq-edp--evening::after {
    left: 1.1rem;
    right: 1.1rem;
  }
}

@media (max-width: 320px) {
  .cdq-edp {
    padding: 1rem 0.9rem;
  }
  .cdq-edp__text {
    font-size: 1.05rem;
  }
  .cdq-home__grid {
    gap: 0.75rem;
  }
}

@media (min-width: 280px) and (max-width: 360px) {
  .cdq-edp,
  .cdq-home-pilot,
  .cdq-inspire,
  .cdm-quote.cdq-member--pilot .cdq-edp {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cdq-edp,
  .cdq-cite,
  .cdq-keep,
  .cdq-why__summary::before {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cdq-edp.is-enter {
    animation: cdq-fade-in 320ms ease-out;
  }
  @keyframes cdq-fade-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* —— Accueil : DOM unique (pensée → carrousel → citation) ; pas de reorder CSS —— */
.cdq-home-top-stack {
  --cdq-home-rail: min(72rem, 100%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--cdq-home-rail);
  margin: 0 auto 1.5rem;
  box-sizing: border-box;
}

.cdq-home-top-stack__carousel,
.cdq-home-top-stack__quote {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  position: relative;
  z-index: 1;
}

/* Carrousel : visible & interactif mobile (pas de display:none / hauteur nulle) */
.cdq-home-main-carousel,
.cdq-home-top-stack__carousel .cdq-home-main-carousel {
  display: block !important;
  visibility: visible !important;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.cdq-home-main-carousel .cps-slider-wrap {
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  opacity: 1;
}

.cdq-home-main-carousel .cps-slider {
  display: block !important;
  visibility: visible !important;
  width: 100%;
  min-height: 200px;
  height: var(--cps-height-d, 400px);
  opacity: 1 !important;
}

@media (max-width: 768px) {
  .cdq-home-main-carousel .cps-slider {
    min-height: 180px;
    height: var(--cps-height-m, 280px);
  }
}

.cdq-home-photos {
  margin: 0 0 1.5rem;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.cdq-home-partner-anchor {
  display: block;
  width: 100%;
  margin: 1.5rem 0 1.75rem;
}

.cdq-home-partner-anchor .cdp-home-partner-slot,
.cdq-home-partner-anchor .cdp-partner-slot {
  width: 100%;
  max-width: 100%;
}

/* Pensée : rendez-vous éditorial (classique : avant carrousel ; Simple : sous la citation) */
.cdq-home-thought {
  margin: 0 auto 1.75rem;
  max-width: min(72rem, 100%);
  width: 100%;
  padding: 0 0.25rem;
  box-sizing: border-box;
  min-height: 0;
}

.cdq-home-thought.is-pilot {
  min-height: 6.5rem;
}

.cdq-home-thought.is-pilot .cdq-home-thought__slot {
  display: block !important;
  visibility: visible !important;
}

.cdq-home-thought__slot .cdq-edp {
  max-width: none;
  width: 100%;
}

/* Ouverture CDSN Simple */
.cdsn-home-opening {
  width: 100%;
  max-width: min(72rem, 100%);
  margin: 0 auto 1rem;
  box-sizing: border-box;
}

.cdsn-home-opening .cdq-home-thought {
  margin-bottom: 1.5rem;
}

.cdsn-home-opening .cdq-home-thought:not(.is-pilot) {
  margin-top: 0;
  margin-bottom: 0;
}

.cdsn-home-opening .cdq-quote-epigraph + .cdq-home-thought.is-pilot {
  margin-top: 0.75rem;
}

.cdsn-home-opening .cdq-home-main-carousel {
  margin-bottom: 1rem;
}

.cdsn-home-opening .cdq-quote-epigraph {
  margin-bottom: 0.5rem;
}

/* Espacements section accueil (Phase 4.6.4) */
body.home .entry-content > .cdq-home-thought + .cdq-home-main-carousel,
body.home .cdq-home-thought + .cdq-home-main-carousel {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

body.home .cdq-home-main-carousel + .cdq-quote-epigraph,
body.home .cdq-home-top-stack__carousel + .cdq-home-top-stack__quote .cdq-quote-epigraph {
  margin-top: 0;
}

body.home .entry-content > .cdq-quote-epigraph + .cin-wrap,
body.home .cdq-quote-epigraph + .cin-wrap,
.cdq-home-top-stack + .cin-wrap {
  margin-top: 2.25rem;
}

.cin-wrap + .wp-block-columns,
body.home .cin-wrap + .wp-block-columns {
  margin-top: 1.75rem;
}

/* Footer Astra : ne pas laisser un wrapper home le masquer hors simple-mode */
body.home:not(.cdsn-simple-mode):not(.cdsn-app-shell-active) .site-footer,
body.home:not(.cdsn-simple-mode):not(.cdsn-app-shell-active) #colophon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  z-index: auto !important;
  pointer-events: auto !important;
}

/* —— Citation épigraphe accueil (présence éditoriale) —— */
.cdq-quote-epigraph {
  --cdq-epi-accent: #c45b7a;
  position: relative;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 1.35rem 1.35rem 1.2rem 1.55rem;
  text-align: left;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 246, 243, 0.92) 100%);
  border: 1px solid rgba(36, 48, 68, 0.1);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.cdq-quote-epigraph::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cdq-epi-accent), rgba(196, 91, 122, 0.35));
}

.cdq-quote-epigraph__label {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: #4a5a7a;
}

.cdq-quote-epigraph .cdq {
  margin: 0;
  position: relative;
}

.cdq-quote-epigraph .cdq__quote {
  font-family: var(--cdq-font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.42;
  font-weight: 450;
  color: #1f2a3d;
  margin: 0 0 0.65rem;
  padding-left: 0.15rem;
}

.cdq-quote-epigraph .cdq__meta {
  margin: 0 0 0.85rem;
  padding-left: 0.15rem;
}

.cdq-quote-epigraph .cdq__author {
  font-style: italic;
  font-size: 0.95rem;
  color: #3d4d66;
  opacity: 1;
}

.cdq-quote-epigraph .cdq__author::before {
  content: "— ";
}

.cdq-quote-epigraph .cdq__keep {
  margin: 0;
  display: inline-flex;
  vertical-align: middle;
}

.cdq-quote-epigraph .cdq-keep {
  background: transparent;
  border-color: rgba(36, 48, 68, 0.16);
  font-weight: 550;
  font-size: 0.88rem;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
}

.cdq-quote-epigraph .cdq-rotator__slides + .cdq-rotator__toolbar,
.cdq-rotator--epigraph .cdq-rotator__toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Toolbar + Garder sur une ligne quand possible */
.cdq-quote-epigraph .cdq-rotator--epigraph .cdq-rotator__slides {
  margin-bottom: 0.15rem;
}

.cdq-quote-epigraph .cdq__keep + .cdq-rotator__toolbar,
.cdq-quote-epigraph .cdq-rotator__toolbar {
  margin-top: 0.55rem;
}

.cdq-rotator--epigraph .cdq-rotator__btn--icon {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(36, 48, 68, 0.14);
  background: rgba(255, 255, 255, 0.65);
  color: #2a3550;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cdq-rotator--epigraph .cdq-rotator__btn--icon:focus-visible,
.cdq-quote-epigraph .cdq-keep:focus-visible {
  outline: 2px solid rgba(196, 91, 122, 0.55);
  outline-offset: 2px;
}

/* Espacements section accueil — gérés plus haut (Phase 4.6.4 DOM unique) */

@media (max-width: 781px) {
  .cdq-quote-epigraph {
    padding: 1rem 1rem 0.9rem 1.2rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(36, 48, 68, 0.14);
    box-shadow: 0 6px 18px rgba(36, 48, 68, 0.06);
  }
  .cdq-quote-epigraph .cdq__quote {
    font-size: clamp(1.08rem, 4.4vw, 1.28rem);
    line-height: 1.4;
    margin-bottom: 0.45rem;
    color: #1a2436;
  }
  .cdq-quote-epigraph__label {
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
    color: #3d4d72;
  }
  .cdq-quote-epigraph .cdq__meta {
    margin-bottom: 0.55rem;
  }
  .cdq-quote-epigraph .cdq__author {
    font-size: 0.92rem;
    color: #2a3550;
  }
  .cdq-home-thought {
    margin: 0 0 1.5rem;
    max-width: 100%;
  }
  .cdq-home-thought.is-pilot .cdq-home-thought__slot .cdq-edp {
    width: 100%;
  }
  .cdq-home-partner-anchor {
    margin: 1.15rem 0 1.35rem;
  }
  .cdq-home-photos {
    margin-bottom: 1.15rem;
  }
}

@media (max-width: 390px) {
  .cdq-quote-epigraph {
    padding: 0.85rem 0.8rem 0.75rem 1rem;
  }
  .cdq-rotator--epigraph .cdq-rotator__btn--icon {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 320px) {
  .cdq-home-top-stack {
    gap: 0.7rem;
  }
  .cdq-quote-epigraph .cdq__quote {
    font-size: 1.02rem;
  }
}
