/* ===================================
   Nindo Training — ambiance « sakura »
   Décor du composant <x-sakura> (resources/views/components/sakura.blade.php) :
   courbes or rose dans les coins + pétales qui flottent.
   Chargé après style.css (variables --navy*, --rose-gold*).
   =================================== */

/* Calque décoratif : sous le contenu, au-dessus du fond / des médias */
.sakura,
.hero > .sakura {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
/* Dans le hero : même niveau que le voile .hero-overlay (z 1) mais placé après
   lui dans le DOM, donc au-dessus des photos/vidéo et sous le texte. */
.hero > .sakura { z-index: 1; }

/* --- Courbes des coins (comme sur le visuel de marque) --- */
.sakura-corner {
    position: absolute;
    width: clamp(150px, 26vw, 400px);
    height: auto;
    aspect-ratio: 4 / 3;
}
.sakura-corner--tr { top: 0; right: 0; }
.sakura-corner--bl { bottom: 0; left: 0; width: clamp(120px, 20vw, 320px); }
.sakura-corner-fill { fill: var(--navy-deep); }
.sakura-corner-line {
    fill: none;
    stroke: var(--rose-gold);
    stroke-width: 9;
    stroke-linecap: round;
}

/* --- Pétales --- */
.sakura-petal {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: calc(var(--s) * 0.75);
    background: center / contain no-repeat;
    transform: rotate(var(--r));
    animation: sakura-float var(--dur, 14s) ease-in-out var(--delay, 0s) infinite alternate;
    will-change: transform;
}

/* Pétale or rose avec nervure */
.sakura-petal--rose {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f6d2d0'/%3E%3Cstop offset='1' stop-color='%23c98a8f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 21C5 7 19 1 31 3 27 15 15 23 1 21Z' fill='url(%23g)'/%3E%3Cpath d='M3 20C11 15 19 9 28 4' stroke='%23163a6e' stroke-width='.9' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    opacity: 0.9;
}

/* Pétale « encre » marine, flou de profondeur */
.sakura-petal--ink {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath d='M1 21C5 7 19 1 31 3 27 15 15 23 1 21Z' fill='%236b6f9e'/%3E%3Cpath d='M3 20C11 15 19 9 28 4' stroke='%23141a2e' stroke-width='.9' fill='none'/%3E%3C/svg%3E");
    opacity: 0.35;
    filter: blur(1.5px);
}

/* Pétale moucheté (texture pointillée du visuel) */
.sakura-petal--speck {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath d='M1 21C5 7 19 1 31 3 27 15 15 23 1 21Z' fill='%23c98a8f' fill-opacity='.35'/%3E%3Cg fill='%23f0c8c6'%3E%3Ccircle cx='9' cy='16' r='.9'/%3E%3Ccircle cx='14' cy='12' r='.7'/%3E%3Ccircle cx='19' cy='9' r='.9'/%3E%3Ccircle cx='24' cy='7' r='.6'/%3E%3Ccircle cx='12' cy='18' r='.6'/%3E%3Ccircle cx='17' cy='14' r='.8'/%3E%3Ccircle cx='22' cy='11' r='.6'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.55;
}

@keyframes sakura-float {
    0%   { transform: translate3d(0, 0, 0) rotate(var(--r)); }
    50%  { transform: translate3d(14px, 18px, 0) rotate(calc(var(--r) + 14deg)); }
    100% { transform: translate3d(-8px, 34px, 0) rotate(calc(var(--r) - 8deg)); }
}

/* Mobile : moins de pétales, coins plus discrets */
@media (max-width: 640px) {
    .sakura-petal:nth-of-type(n + 7) { display: none; }
    .sakura-corner--bl { display: none; }
}

/* Mouvement réduit : pétales figés */
@media (prefers-reduced-motion: reduce) {
    .sakura-petal { animation: none; }
}
[data-motion="reduce"] .sakura-petal { animation: none; }

/* Bannière / footer : pétales plus discrets derrière le texte */
.wod-banner .sakura-petal,
.footer .sakura-petal { opacity: 0.35; }
.footer .sakura-corner--bl { display: none; }

/* Police d'accent (URL / signature du visuel) */
.hero-eyebrow,
.section-eyebrow { font-family: var(--font-accent); letter-spacing: 0.04em; }

/* Semaine type du planning : lisible en thème sombre */
[data-theme="dark"] .week-time { color: var(--text); }
