/* Haut de la page d'accueil en slider (4/12/2026, proposition A de https://claude.ai/artifact/MwBiioA2vB3gsQ9nzkZng9) :
   composants/SliderAccueil.tsx et PageAccueil.tsx. Chaque vue reprend la mise en page « C » du haut de page
   (.cx-ds-haut, site.css) ; le fond suit la vue affichée : clair (l'école, les rentrées), noir et or (les ateliers),
   rouge (les cartes cadeaux). Toutes les vues sont empilées dans la même case : la hauteur ne change pas. */
.ac { --ac-actif: #8c3c39; --ac-repos: #5c5550; --ac-barre: #e0d9d2; --ac-trait: #cfc8c1; --ac-encre: #000;
  background: var(--fond-doux); transition: background-color .4s ease; }
.ac[data-theme="noir"] { --ac-actif: #c59b6c; --ac-repos: #bdb4ad; --ac-barre: #3a332e; --ac-trait: #4a3f36; --ac-encre: #f5f1ed; background: #000; }
/* Rouge un ton plus sombre que la bande rouge qui suit le haut de page, pour que les deux ne se confondent pas. */
.ac[data-theme="rouge"] { --ac-actif: #fff; --ac-repos: #f1dcbc; --ac-barre: #925049; --ac-trait: #a8625c; --ac-encre: #fff; background: #742f2c; }
.ac-vues { display: grid; }
.ac-vue { grid-area: 1 / 1; min-width: 0; visibility: hidden; opacity: 0; transition: opacity .5s ease, visibility 0s linear .5s; }
.ac-vue.ac-active { visibility: visible; opacity: 1; transition: opacity .5s ease; }
.ac .cx-ds-haut { background: transparent; padding-bottom: 32px; height: 100%; box-sizing: border-box; }

/* Textes des vues */
.ac-sur { margin: 0; font: 700 12px/16px Inter, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #8a6638; }
.ac .ac-titre { margin: 0; font: 300 54px/60px Buda, Georgia, serif; color: var(--texte); text-wrap: balance; }
.ac-texte { margin: 0; max-width: 560px; font: 400 17px/28px Inter, sans-serif; color: var(--texte-doux); }
.ac-vue[data-theme="noir"] .ac-sur { color: #c59b6c; }
.ac-vue[data-theme="noir"] .ac-titre { color: #fff; }
.ac-vue[data-theme="noir"] .ac-texte { color: #d8d0c9; }
.ac-vue[data-theme="rouge"] .ac-sur { color: #f1dcbc; }
.ac-vue[data-theme="rouge"] .ac-titre { color: #fff; }
.ac-vue[data-theme="rouge"] .ac-texte { color: #f6e9e8; }
.ac-vue[data-theme="rouge"] .cx-ds-filet { background: #f1dcbc; }
.ac .ac-bouton-or { --bouton-fond: #c59b6c; --bouton-texte: #000; --bouton-vide: #c59b6c; }
.ac .ac-bouton-blanc { --bouton-fond: #fff; --bouton-texte: #8c3c39; --bouton-vide: #fff; }

/* Visuels */
.ac-deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; }
.ac-deux a, .ac-deux picture { display: block; height: 100%; }
.ac-deux img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ac-enveloppe { display: flex; justify-content: center; align-items: flex-end; padding-top: 170px; background: transparent; }
.ac-enveloppe .cg-env { transform: rotate(-4deg); }
/* La carte sortie aussi large que l'enveloppe : sinon les deux coins crème du fond dépassent de chaque côté (remarque de
   Nicolas, 4/12/2026). */
/* La carte penche, comme tirée à la main (remarque de Nicolas : trop symétrique). */
.ac-enveloppe .cg-env .cg-sortie { left: 0; right: 0; }
.ac-enveloppe .cg-env.cg-ouvert .cg-sortie { transform: translate(16px, -150px) rotate(9deg); z-index: 6; }
/* Scintillement autour de la carte cadeau (demande de Cédric, 4/12/2026) : huit petites étoiles dorées qui s'allument tour
   à tour autour de la carte, et un reflet de lumière qui la traverse toutes les 4 secondes. Seulement sur la vue
   affichée ; rien ne bouge si la personne a demandé « moins d'animations ». */
.ac-etincelles { position: absolute; inset: -40px; pointer-events: none; z-index: 1; }
.ac { overflow-x: clip; }
.ac-etincelles i { position: absolute; width: 22px; height: 22px; background: #f1dcbc; opacity: 0; transform: scale(0);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 6px rgba(255,236,200,.95)); animation: ac-scintille 2.4s ease-in-out infinite; }
.ac-etincelles i:nth-child(1) { left: 4px; top: 18px; animation-delay: 0s; }
.ac-etincelles i:nth-child(2) { right: 26px; top: 0; width: 32px; height: 32px; animation-delay: .4s; }
.ac-etincelles i:nth-child(3) { right: 2px; top: 44%; width: 18px; height: 18px; animation-delay: 1s; }
.ac-etincelles i:nth-child(4) { left: 36%; top: 2px; width: 18px; height: 18px; animation-delay: 1.5s; }
.ac-etincelles i:nth-child(5) { left: 0; top: 52%; width: 28px; height: 28px; animation-delay: 1.9s; }
.ac-etincelles i:nth-child(6) { right: 8px; top: 72%; width: 20px; height: 20px; background: #c59b6c; animation-delay: .7s; }
.ac-etincelles i:nth-child(7) { left: 64%; top: 10px; width: 14px; height: 14px; animation-delay: 2.2s; }
.ac-etincelles i:nth-child(8) { left: 14px; top: 32%; width: 14px; height: 14px; background: #c59b6c; animation-delay: 1.2s; }
@keyframes ac-scintille { 0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: 0; transform: scale(.3) rotate(90deg); } }
.ac-enveloppe .cg-sortie .cg-carte { z-index: 2; }
.ac-enveloppe .cg-carte::before { content: ""; position: absolute; inset: -40% -60%; z-index: 3; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255,240,215,.45) 50%, transparent 58%);
  transform: translateX(-60%); animation: ac-reflet 4s ease-in-out 1.2s infinite; }
@keyframes ac-reflet { 0% { transform: translateX(-60%); } 35%, 100% { transform: translateX(60%); } }
.ac-vue:not(.ac-active) .ac-etincelles i, .ac-vue:not(.ac-active) .ac-enveloppe .cg-carte::before { animation-play-state: paused; }
/* Rabat ouvert descendu de quelques pixels : ses angles prolongent les bords de l'enveloppe au lieu de dépasser au-dessus
   (remarque de Nicolas, 4/12/2026). */
.ac-rentrees { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 560px; }
.ac-rentrees li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid #e5e0db; font: 400 16px/24px Inter, sans-serif; }
.ac-rentrees li:last-child { border-bottom: 1px solid #e5e0db; }
.ac-rentrees b { color: var(--texte); }
/* Le format sous la formation (« intensif en 2 ans », « en 5 ans »), demande de Nicolas du 4/12/2026 : deux lignes
   « Médecine chinoise » ne se distinguaient pas. */
.ac-rentrees .ac-format { display: block; font: 400 14px/20px Inter, sans-serif; font-style: normal; color: var(--texte-doux); }
.ac-rentrees span { color: var(--texte-doux); text-align: right; }

/* Onglets et flèches */
.ac-nav { display: flex; align-items: flex-end; gap: 24px; padding: 0 max(24px, calc((100% - 1140px) / 2)) 32px; }
.ac-onglets { flex: 1; display: flex; gap: 24px; min-width: 0; }
.ac-onglet { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 44px; padding: 10px 0 0; border: 0; background: none;
  cursor: pointer; text-align: left; font: 700 14px/18px Inter, sans-serif; color: var(--ac-repos); }
.ac-barre { display: block; height: 3px; border-radius: 2px; background: var(--ac-barre); }
.ac-onglet[aria-selected="true"] { color: var(--ac-actif); }
.ac-onglet[aria-selected="true"] .ac-barre { background: var(--ac-actif); }
/* Minuteur : la barre de l'onglet affiché se remplit en 5 secondes (composants/SliderAccueil.tsx), puis la vue change ;
   elle s'arrête au clavier, doigt posé et sur Pause (pas au survol). Sans défilement (« moins d'animations »), la barre est pleine. */
.ac-barre { position: relative; overflow: hidden; }
.ac[data-auto="true"] .ac-onglet[aria-selected="true"] .ac-barre { background: var(--ac-barre); }
.ac-progres { position: absolute; inset: 0; background: var(--ac-actif); transform-origin: left center; animation-name: ac-remplir; animation-timing-function: linear; animation-fill-mode: both; }
.ac[data-arret="true"] .ac-progres { animation-play-state: paused; }
@keyframes ac-remplir { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ac-numero { display: none; }
.ac-fleches { display: flex; gap: 8px; }
.ac-fleche { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ac-trait); border-radius: 4px; background: none; color: var(--ac-encre); cursor: pointer; }
.ac-fleche svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.ac-onglet:focus-visible, .ac-fleche:focus-visible { outline: 2px solid var(--ac-actif); outline-offset: 3px; }
/* Le thème d'origine colore tout bouton survolé ou cliqué : les boutons du slider gardent leurs couleurs. */
.ac .ac-onglet, .ac .ac-onglet:hover, .ac .ac-onglet:focus, .ac .ac-onglet:active { background: none !important; border: 0 !important; color: var(--ac-repos) !important; }
.ac .ac-onglet[aria-selected="true"] { color: var(--ac-actif) !important; }
.ac .ac-onglet:hover .ac-nom { text-decoration: underline; text-underline-offset: 4px; }
.ac .ac-fleche, .ac .ac-fleche:focus, .ac .ac-fleche:active { background: none !important; border: 1px solid var(--ac-trait) !important; color: var(--ac-encre) !important; }
.ac .ac-fleche:hover { background: var(--ac-barre) !important; border-color: var(--ac-actif) !important; color: var(--ac-encre) !important; }

@media (max-width: 767px) {
  .ac .cx-ds-haut { padding-bottom: 12px; }
  .ac .ac-visuel { order: -1; }
  .ac .ac-titre { font-size: 36px; line-height: 42px; }
  .ac-texte { font-size: 16px; line-height: 26px; }
  .ac-rentrees li { flex-direction: column; gap: 2px; font-size: 14px; line-height: 20px; }
  .ac-rentrees span { text-align: left; }
  .ac-enveloppe { padding-top: 140px; }
  .ac-enveloppe .cg-env { transform: rotate(-4deg) scale(.85); transform-origin: bottom center; }
  .ac-etincelles { inset: -40px -16px; }
  .ac-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: center; padding: 0 20px 24px; }
  .ac-onglets { gap: 6px; }
  .ac-nom { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ac-numero { display: block; grid-row: 2; font: 700 13px/16px Inter, sans-serif; color: var(--ac-actif); }
  .ac-fleches { grid-row: 1 / 3; grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-etincelles i, .ac-enveloppe .cg-carte::before { animation: none; }
  .ac-etincelles i:nth-child(odd) { opacity: .8; transform: scale(.8) rotate(45deg); }
  .ac, .ac-vue, .ac-vue.ac-active { transition: none; }
  .ac-progres { display: none; }
  .ac[data-auto="true"] .ac-onglet[aria-selected="true"] .ac-barre { background: var(--ac-actif); }
}
