/* CIP — couche de finition : s'appuie sur le design existant (bleu ciel, orange, LeBeaune). */
:root { --cip-navy: #0a2747; --cip-sky: #0369a1; --cip-cyan: #1ec8e6; --cip-orange: #f39237; --cip-ease: cubic-bezier(.2,.7,.2,1); }
html { scroll-behavior: smooth; }
::selection { background: rgba(30,200,230,.25); }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(30,200,230,.6); outline-offset: 2px; border-radius: 6px; }

/* ---------- Bannière : même forme, finition premium ---------- */
.cb .cb-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s linear 1.2s; overflow: hidden; }
.cb .cb-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.2s ease; }
.cb .cb-slide img { transform: scale(1.04); }
.cb .cb-slide.is-active img { animation: cb-kenburns 9s ease-out both; }
.cb.is-paused .cb-slide.is-active img { animation-play-state: paused; }
@keyframes cb-kenburns { from { transform: scale(1.04) translate3d(0,0,0); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }

.cb .cb-overlay { background:
  radial-gradient(120% 90% at 50% 40%, rgba(10,39,71,.35) 0%, rgba(10,39,71,.78) 70%),
  linear-gradient(180deg, rgba(6,22,40,.82) 0%, rgba(6,22,40,.55) 40%, rgba(6,22,40,.85) 100%); }
.cb .cb-overlay::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--cip-orange), #fde3c4 35%, var(--cip-cyan) 70%, var(--cip-sky)); background-size: 200% 100%; animation: cb-flow 8s linear infinite; }
@keyframes cb-flow { to { background-position: 200% 0; } }

.cb .cb-text { text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.cb .cb-title { letter-spacing: .02em; }

.cb .half-vertical-divider { background: linear-gradient(var(--cip-cyan), #fff); }

.cb .cb-line { opacity: 0; transform: translateY(16px); animation: cb-in .9s var(--cip-ease) forwards; }
.cb .cb-line:nth-child(1) { animation-delay: .1s; }
.cb .cb-line:nth-child(2) { animation-delay: .25s; }
.cb .cb-line:nth-child(3) { animation-delay: .4s; }
.cb .cb-line:nth-child(4) { animation-delay: .5s; }
.cb .cb-line:nth-child(5) { animation-delay: .6s; }
.cb .cb-line:nth-child(6) { animation-delay: .72s; }
.cb .cb-line:nth-child(7) { animation-delay: .85s; }
@keyframes cb-in { to { opacity: 1; transform: none; } }

.cb .cb-ctas { justify-content: center; gap: 12px; margin-top: 2px; }
.cb .cb-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; letter-spacing: .02em; transition: transform .25s, box-shadow .25s, background .25s, color .25s; text-shadow: none; }
.cb .cb-btn i { transition: transform .25s; }
.cb .cb-btn:hover { transform: translateY(-2px); }
.cb .cb-btn:hover i { transform: translateX(4px); }
.cb .cb-btn--solid { color: #062441; background: linear-gradient(135deg, #fde3c4, var(--cip-orange)); box-shadow: 0 12px 26px -12px rgba(243,146,55,.9); }
.cb .cb-btn--ghost { color: #fff; border: 1.5px solid rgba(255,255,255,.8); backdrop-filter: blur(4px); }
.cb .cb-btn--ghost:hover { background: #fff; color: var(--cip-navy); }

.cb [data-carousel-prev] > span, .cb [data-carousel-next] > span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); transition: background .25s, transform .25s; }
.cb [data-carousel-prev]:hover > span, .cb [data-carousel-next]:hover > span { background: rgba(255,255,255,.3); transform: scale(1.08); }
.cb-dots { gap: 8px; }
.cb-dot { position: relative; width: 26px; height: 5px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.35); overflow: hidden; cursor: pointer; transition: width .35s var(--cip-ease), background .25s; }
.cb-dot:hover { background: rgba(255,255,255,.6); }
.cb-dot span { position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--cip-orange), var(--cip-cyan)); }
.cb-dot.is-active { width: 54px; background: rgba(255,255,255,.4); }
.cb-dot.is-active span { animation: cb-progress var(--cb-delay, 6000ms) linear forwards; }
.cb.is-paused .cb-dot.is-active span { animation-play-state: paused; }
@keyframes cb-progress { to { transform: scaleX(1); } }

/* ---------- En-tête fixe ---------- */
#fixed-header { backdrop-filter: saturate(1.4) blur(10px); background-image: linear-gradient(to bottom right, rgba(186,230,253,.92), rgba(240,249,255,.92), rgba(254,215,170,.92)) !important; box-shadow: 0 8px 30px -12px rgba(10,39,71,.35); animation: cip-drop .45s var(--cip-ease); }
@keyframes cip-drop { from { transform: translateY(-100%); } to { transform: none; } }
#default-megamenu ul li > button, #default-megamenu ul li > a { position: relative; }
#default-megamenu > div > ul > li > button::after, #default-megamenu > div > ul > li > a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -4px; height: 2px; border-radius: 2px; background: var(--cip-orange); transition: left .3s var(--cip-ease), right .3s var(--cip-ease); }
#default-megamenu > div > ul > li:hover > button::after, #default-megamenu > div > ul > li:hover > a::after { left: 8px; right: 8px; }

/* ---------- Titres de section ---------- */
main section h1.lebeaune-font { letter-spacing: .04em; }
.horizontal-line { height: 4px !important; border-radius: 999px; background-image: linear-gradient(90deg, var(--cip-orange), var(--cip-cyan)); }
.cip-js .horizontal-line { transform: translateX(-50%) scaleX(0); transition: transform 1s var(--cip-ease) .15s; }
.cip-js .is-in .horizontal-line, .cip-js .horizontal-line.is-in { transform: translateX(-50%) scaleX(1); }

/* ---------- Cartes ---------- */
.swiper-slide > .rounded-2xl, a.swiper-slide > .rounded-2xl { transition: transform .45s var(--cip-ease), box-shadow .45s var(--cip-ease), border-color .3s !important; }
.swiper-slide:hover > .rounded-2xl { transform: translateY(-6px); box-shadow: 0 22px 44px -22px rgba(10,39,71,.45); border-color: rgba(3,105,161,.25); }
.swiper-slide .rounded-2xl img { transition: transform .9s var(--cip-ease); }
.swiper-slide:hover .rounded-2xl img { transform: scale(1.06); }
.swiper-slide > .rounded-2xl h2 { transition: color .3s; }
.swiper-slide:hover > .rounded-2xl h2 { color: var(--cip-sky); }
a.swiper-slide.rounded-2xl { transition: transform .45s var(--cip-ease), box-shadow .45s; }
a.swiper-slide.rounded-2xl:hover { box-shadow: 0 24px 50px -24px rgba(10,39,71,.6); }
a.swiper-slide.rounded-2xl .overlay { transition: opacity .4s; }
a.swiper-slide.rounded-2xl:hover .overlay { opacity: .38; }

.trapezoid-card { transition: transform .45s var(--cip-ease), box-shadow .45s var(--cip-ease), background-color .4s !important; }
.trapezoid-card:hover { transform: translateY(-8px); box-shadow: 0 26px 50px -26px rgba(30,27,75,.55); }

/* Boutons existants (S'inscrire, Voir tous...) */
a[href*="session_id"], .swiper-slide a.rounded-full { position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s; }
a[href*="session_id"]::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
a[href*="session_id"]:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(243,146,55,.8); }
a[href*="session_id"]:hover::after { transform: translateX(120%); }

/* Flèches des carrousels */
[class*="carousel-"][class*="-prev"] > span, [class*="carousel-"][class*="-next"] > span { transition: transform .25s, background .25s; }
[class*="carousel-"][class*="-prev"]:hover > span, [class*="carousel-"][class*="-next"]:hover > span { transform: scale(1.1); }

/* Partenaires : gris puis couleur au survol */
#partner img { filter: grayscale(1); opacity: .75; transition: filter .4s, opacity .4s, transform .4s; }
#partner img:hover { filter: none; opacity: 1; transform: scale(1.05); }

/* ---------- Apparition au défilement ---------- */
.cip-js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--cip-ease), transform .8s var(--cip-ease); transition-delay: calc(var(--reveal-i, 0) * 90ms); }
.cip-js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cb .cb-line { opacity: 1; transform: none; animation: none; }
  .cb .cb-slide.is-active img, .cb .cb-overlay::after, .cb-dot.is-active span, #fixed-header { animation: none !important; }
  .cip-js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .cip-js .horizontal-line { transform: translateX(-50%); }
}

/* Ajustements bannière */
.cb .cb-text h3.title-subtitle { padding-top: .7rem; padding-bottom: .7rem; }
.cb a.cb-btn--ghost, .cb a.cb-btn--ghost:visited { color: #fff !important; }
.cb a.cb-btn--ghost:hover { color: var(--cip-navy) !important; }
.cb a.cb-btn--solid, .cb a.cb-btn--solid:visited { color: #062441 !important; }
@media (min-width: 768px) { .cb .cb-ctas { margin-top: .2rem; } }
@media (max-width: 767px) {
  .cb [data-carousel-prev], .cb [data-carousel-next] { display: none; }
  .cb-dot { width: 18px; }
  .cb-dot.is-active { width: 40px; }
}
