/* Roue de la fortune : même vert que le reste du site */
#features.ro-section { padding-top: 1em; }
.ro-outil { max-width: 74em; margin: 0 auto; text-align: left; display: flex; flex-direction: column; }
.ro-outil *:focus-visible { outline: 3px solid #f2b01e; outline-offset: 2px; }
.ro-outil:fullscreen, .ro-outil:-webkit-full-screen { background: #fff; padding: 1em 1.5em; max-width: none; height: 100vh; box-sizing: border-box; overflow: auto; }

/* La scène et la roue */
.ro-scene { position: relative; display: flex; align-items: center; justify-content: center; min-height: 20em; padding: 1.2em 0 .6em; border: 2px solid #e5e5e5; border-radius: 1.2em; background: #fff radial-gradient(circle at 50% 45%, #f3fbf7 0, #fff 70%); overflow: hidden; }
.ro-outil:fullscreen .ro-scene, .ro-outil:-webkit-full-screen .ro-scene { flex: 1 1 auto; }
.ro-roue { position: relative; width: min(34em, 86vw, 62vh); aspect-ratio: 1; touch-action: none; -webkit-user-select: none; user-select: none; }
.ro-outil:fullscreen .ro-roue, .ro-outil:-webkit-full-screen .ro-roue { width: min(92vw, 74vh); }
/* plein écran : la roue à gauche, entière et aussi grande que la hauteur le permet ; les réglages empilés à droite */
.ro-outil:fullscreen { flex-direction: row; gap: 1em; align-items: stretch; }
.ro-outil:fullscreen .ro-scene { min-width: 0; padding: 1em; }
.ro-outil:fullscreen .ro-roue { width: min(calc(100vh - 6em), 100%); }
.ro-outil:fullscreen .ro-reglages { flex: 0 0 min(28em, 36vw); grid-template-columns: minmax(0, 1fr); align-content: start; gap: .7em; margin-top: 0; }
.ro-outil:fullscreen .ro-panneau { padding: .6em .9em .7em; }
.ro-outil:fullscreen .ro-panneau h3 { margin-bottom: .4em; }
.ro-outil:fullscreen .ro-panneau textarea { min-height: 5.5em; height: 7.5em; }
.ro-roue canvas { width: 100%; height: 100%; display: block; cursor: grab; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .14)); }
.ro-roue canvas.tourne { cursor: grabbing; }
.ro-fleche { position: absolute; left: 50%; top: -4px; width: 0; height: 0; margin-left: -1.05em; border-left: 1.05em solid transparent; border-right: 1.05em solid transparent; border-top: 2.1em solid #333; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .25)); transform-origin: 50% 0; transition: transform .08s; z-index: 2; }
.ro-fleche:after { content: ''; position: absolute; left: -.45em; top: -2.05em; width: .9em; height: .9em; border-radius: 50%; background: #f2b01e; }
.ro-fleche.clic { transform: rotate(-16deg); transition: none; }
.ro-centre { position: absolute; left: 50%; top: 50%; width: 23%; height: 23%; transform: translate(-50%, -50%); border-radius: 50% !important; border: 5px solid #fff !important; background: #16855a !important; color: #fff !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .25) !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15em; padding: 0 !important; cursor: pointer; font: 700 clamp(.7rem, 2.6vw, 1.05rem)/1 'Fredoka', 'Nunito', sans-serif !important; letter-spacing: .03em !important; text-transform: none !important; transition: transform .15s, background-color .2s; z-index: 2; }
.ro-centre .icon { font-size: 1.3em; }
.ro-centre b { color: #fff; font-weight: 700; }
.ro-centre .icon:before { margin: 0; }
.ro-centre:hover { transform: translate(-50%, -50%) scale(1.06); }
.ro-centre:active { transform: translate(-50%, -50%) scale(.96); }
.ro-centre[disabled] { background: #9fd3ba !important; cursor: default; transform: translate(-50%, -50%); }
.ro-vide { position: absolute; inset: auto 1em 1em; margin: 0; text-align: center; color: #b76a06; font-weight: 700; background: #fdf2e1; border-radius: 2em; padding: .5em 1em; z-index: 3; }
.ro-vide[hidden] { display: none; }

/* Le résultat */
.ro-resultat { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .55); z-index: 5; animation: ro-fondu .25s ease-out; }
.ro-resultat[hidden] { display: none; }
@keyframes ro-fondu { from { opacity: 0; } }
.ro-carte { background: #fff; border: 3px solid #16855a; border-radius: 1.4em; padding: 1.2em 2em 1.3em; text-align: center; box-shadow: 0 14px 40px rgba(0, 0, 0, .18); max-width: 90%; animation: ro-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ro-pop { from { transform: scale(.4); opacity: 0; } }
.ro-sous { margin: 0; color: #999; font-size: .9em; letter-spacing: .1em; text-transform: uppercase; }
.ro-nom { margin: .1em 0 .2em; font: 700 clamp(2em, 7vw, 3.6em)/1.15 'Fredoka', 'Nunito', sans-serif; color: #16855a; overflow-wrap: anywhere; }
.ro-note { margin: 0 0 .7em; min-height: 1em; color: #999; font-size: .85em; }
.ro-boutons { display: flex; gap: .6em; justify-content: center; flex-wrap: wrap; }
.ro-bouton { display: inline-flex; align-items: center; gap: .45em; padding: 0 1.3em !important; height: 2.6em !important; line-height: 2.6em !important; border-radius: 2em !important; background: #16855a !important; color: #fff !important; font-size: .85em !important; box-shadow: none !important; cursor: pointer; }
.ro-bouton.ro-second { background: #fff !important; color: #16855a !important; border: 2px solid #16855a !important; }

.ro-confettis { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.ro-confettis i { position: absolute; top: 45%; left: 50%; width: .55em; height: .9em; border-radius: 2px; animation: ro-confetti 1.3s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes ro-confetti { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

.ro-astuce { margin: .6em 0 0; text-align: center; font-size: .82em; color: #999; }
.ro-astuce .icon { color: #5cc79a; margin-right: .3em; }
.ro-outil:fullscreen .ro-astuce, .ro-outil:-webkit-full-screen .ro-astuce { display: none; }

/* Réglages en dessous, en paysage */
.ro-reglages { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1em; margin-top: 1em; }
.ro-panneau { background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: .8em 1em 1em; }
.ro-panneau h3 { margin: 0 0 .6em; font-size: .85em; color: #16855a; text-align: center; letter-spacing: .08em; text-transform: uppercase; }
.ro-panneau textarea { width: 100%; box-sizing: border-box; font-size: .95em; line-height: 1.5; padding: .5em .7em; border-radius: .7em; resize: vertical; min-height: 9em; }
.ro-info { margin: .4em 0; font-size: .82em; color: #888; text-align: center; }
.ro-info.alerte { color: #b76a06; font-weight: 700; }
.ro-puces { display: flex; flex-wrap: wrap; gap: .35em; justify-content: center; margin: .3em 0 .6em; }
.ro-puce { padding: .2em .8em; border: 2px solid #e5e5e5; border-radius: 2em; background: #fff; color: #666; cursor: pointer; font-size: .82em; -webkit-user-select: none; user-select: none; transition: border-color .2s; }
.ro-puce:hover { border-color: #5cc79a; }
.ro-puce.actif { background: #16855a; border-color: #16855a; color: #fff; }
.ro-ligne { display: flex; flex-wrap: wrap; gap: .5em; align-items: center; justify-content: center; margin-top: .5em; }
.ro-ligne select { flex: 1 1 10em; min-width: 0; height: 2.4em; font-size: .85em; border-radius: .6em; }
.ro-mini { display: inline-flex; align-items: center; gap: .4em; padding: 0 1em !important; height: 2.4em !important; line-height: 2.4em !important; border-radius: 2em !important; background: #fff !important; color: #16855a !important; border: 2px solid #5cc79a !important; box-shadow: none !important; font-size: .78em !important; letter-spacing: .02em !important; text-transform: none !important; cursor: pointer; }
.ro-mini.ro-plein { background: #16855a !important; color: #fff !important; border-color: #16855a !important; }
.ro-import { margin-top: .7em; padding: .7em .8em; border: 2px dashed #e5e5e5; border-radius: .9em; font-size: .9em; }
.ro-import[hidden] { display: none; }
.ro-import select { width: 100%; margin-bottom: .4em; }
.ro-import-titre { margin: 0 0 .4em; font-weight: 700; color: #555; }
.ro-etiquette { display: block; font-size: .85em; color: #888; margin: .3em 0 .2em; }
.ro-case { display: flex; align-items: center; gap: .4em; font-size: .9em; color: #666; }
.ro-apercu { margin: .3em 0; font-size: .85em; color: #16855a; }

.ro-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5em, 1fr)); gap: .5em; } /* deux tuiles par ligne s'il y a la place, sinon une seule */
.ro-act { display: flex; align-items: center; gap: .55em; padding: .45em .8em; border: 2px solid #e5e5e5; border-radius: .8em; background: #fff; color: #555; cursor: pointer; font-size: .9em; line-height: 1.3; -webkit-user-select: none; user-select: none; transition: border-color .2s; }
.ro-act:hover { border-color: #5cc79a; }
.ro-act .icon { flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; background: #eaf7f1; color: #16855a; display: flex; align-items: center; justify-content: center; }
.ro-act .icon:before { margin: 0; }
.ro-act.actif { border-color: #16855a; }
.ro-act.actif .icon { background: #16855a; color: #fff; }
.ro-duree { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45em; margin-top: .9em; font-size: .9em; color: #888; }
.ro-duree > span:first-child { flex-basis: 100%; text-align: center; } /* « Durée » au-dessus, les trois choix sur une ligne */

.ro-tires { display: flex; flex-wrap: wrap; gap: .35em; justify-content: center; max-height: 11em; overflow: auto; }
.ro-tire { padding: .2em .75em; border-radius: 2em; background: #f1f3f5; color: #868e96; font-size: .82em; text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); cursor: pointer; }
.ro-tire:hover { background: #eaf7f1; color: #16855a; text-decoration: none; }
.ro-tire.dernier { background: #eaf7f1; color: #16855a; font-weight: 700; text-decoration: none; }
.ro-aide { margin: .8em 0 0; font-size: .75em; color: #aaa; text-align: center; }

@media screen and (max-width: 1100px) {
	.ro-reglages { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.ro-reglages .ro-panneau:first-child { grid-column: 1 / -1; }
}
@media screen and (max-width: 736px) {
	.ro-reglages { grid-template-columns: minmax(0, 1fr); }
	.ro-scene { min-height: 0; padding: 1.4em .4em .6em; }
	.ro-carte { padding: 1em 1.2em; }
}
@media (prefers-reduced-motion: reduce) { .ro-carte, .ro-resultat, .ro-confettis i { animation: none; } }
