/* L'Atelier du professeur : même vert que L'Atelier de Pi (#16855a, #5cc79a), mêmes cartes que les outils */
#features.ap-section { padding-top: 1em; }
.ap-section [hidden], .ap-etapes [hidden] { display: none !important; }

/* Accueil : les trois étapes */
.ap-etapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.2em; max-width: 72em; margin: 0 auto; }
@media screen and (max-width: 980px) { .ap-etapes { grid-template-columns: minmax(0, 1fr); max-width: 34em; } }
.ap-etape { position: relative; padding: 2em 1.4em 1.4em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; text-align: center; }
.ap-etape h3 { margin: 0 0 .5em; color: #16855a; }
.ap-etape p { margin: 0; color: #666; font-size: .95em; line-height: 1.6; }
.ap-etape .ap-num { position: absolute; top: -1em; left: 50%; transform: translateX(-50%); }
.ap-num { display: inline-flex; align-items: center; justify-content: center; width: 2em; height: 2em; border-radius: 50%; background: #16855a; color: #fff; font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 700; font-size: 1em; line-height: 1; vertical-align: middle; }
.ap-faq { max-width: 46em; margin: 0 auto; padding: 0; list-style: none; text-align: left; color: #666; }
.ap-faq li { margin: 0 0 1em; padding-left: 1.6em; position: relative; line-height: 1.6; }
.ap-faq li:before { content: '✔'; position: absolute; left: 0; color: #16855a; font-weight: 700; }
.ap-faq strong { color: #444; }

/* Page d'un jeu : les étapes l'une sous l'autre */
.ap-page { max-width: 64em; }
.ap-carte { margin: 0 0 1.6em; padding: 1.4em 1.5em 1.3em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; text-align: left; }
.ap-carte > h3 { margin: 0 0 .5em; color: #16855a; text-align: center; }
.ap-carte > h3 .ap-num { margin-right: .4em; }
.ap-aide { margin: 0 auto .9em; max-width: 46em; font-size: .88em; color: #878787; text-align: center; line-height: 1.6; }
.ap-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9em 1.2em; }
.ap-large { grid-column: 1 / -1; }
@media screen and (max-width: 736px) { .ap-champs { grid-template-columns: minmax(0, 1fr); } }
.ap-champ { display: block; margin: 0; }
.ap-champ > span { display: block; margin: 0 0 .3em; font-size: .82em; color: #878787; line-height: 1.4; }
.ap-champ em { font-style: normal; color: #aaa; }
.ap-section input[type="text"], .ap-section select, .ap-section textarea {
	font: inherit; width: 100%; box-sizing: border-box; padding: .55em .75em; border: 2px solid #e5e5e5; border-radius: .6em; background: #fff; color: #555; height: auto; line-height: 1.5;
}
.ap-section textarea { resize: vertical; min-height: 4.5em; }
#reponse, #demande { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .82em; background: #fafafa; }
.ap-section input[type="text"]:focus, .ap-section select:focus, .ap-section textarea:focus { outline: none; border-color: #16855a; background: #fff; }
.ap-case { display: flex; align-items: flex-start; gap: .6em; margin: 0; color: #555; font-size: .92em; cursor: pointer; line-height: 1.5; }
.ap-case input[type="checkbox"] { -webkit-appearance: checkbox !important; appearance: auto !important; opacity: 1 !important; position: static !important; display: inline-block !important; flex: none; width: 1.25em !important; height: 1.25em !important; margin: .15em 0 0 !important; accent-color: #16855a; }
.ap-case:before, .ap-case:after { content: none !important; display: none !important; }
.ap-certif { justify-content: center; max-width: 40em; margin: .2em auto 1em; padding: .8em 1em; border-radius: .8em; background: #f6fcf9; border: 2px solid #e1f3ea; }

.ap-commandes { display: flex; flex-wrap: wrap; gap: .7em; justify-content: center; margin-top: 1.1em; }
.ap-commandes .button[disabled] { opacity: .45; cursor: not-allowed; }
.ap-fichier { position: relative; overflow: hidden; cursor: pointer; }
.ap-fichier input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ap-msg { margin: .7em 0 0; text-align: center; font-size: .9em; color: #878787; min-height: 1.2em; }
.ap-msg.ap-ok { color: #16855a; font-weight: 700; }

.ap-details { margin: 1em 0 0; }
.ap-details > summary { cursor: pointer; color: #16855a; font-weight: 700; font-size: .9em; text-align: center; list-style-position: inside; }
.ap-details > summary:hover { text-decoration: underline; }
.ap-details[open] > summary { margin-bottom: .7em; }

/* Bilan de la vérification */
.ap-bilan { margin-top: 1.1em; }
.ap-bilan p { margin: 0 0 .4em; }
.ap-bilan ul { margin: .3em 0 0; padding-left: 1.3em; }
.ap-bilan li { margin: .2em 0; line-height: 1.45; }
.ap-ok, .ap-ko, .ap-conseil { padding: .8em 1.1em; border-radius: .8em; font-size: .92em; margin-bottom: .8em; }
.ap-ok { background: #eaf7f1; border: 2px solid #5cc79a; color: #0e5c3d; }
.ap-ko { background: #fdeceb; border: 2px solid #e8a39b; color: #8e2a1f; }
.ap-conseil { background: #fff7e3; border: 2px solid #f2d48a; color: #7a5300; }
p.ap-ko { text-align: center; }

/* L'aperçu du jeu */
.ap-jeu { border: 2px solid #e5e5e5; border-radius: 1em; overflow: hidden; background: #fff; }
.ap-jeu iframe { display: block; width: 100%; height: 760px; border: 0; }

/* Relecture */
#relecture h4 { margin: 1.2em 0 .5em; color: #16855a; font-size: .95em; }
.ap-table { width: 100%; border-collapse: collapse; font-size: .82em; margin: 0 0 .8em; }
.ap-table th, .ap-table td { border: 1px solid #e5e5e5; padding: .45em .6em; vertical-align: top; text-align: left; line-height: 1.4; }
.ap-table th { background: #f6fcf9; color: #16855a; font-weight: 700; }
.ap-table-q td:first-child { color: #999; width: 2.5em; }
.ap-table .ap-bon { color: #16855a; font-weight: 700; }
@media screen and (max-width: 736px) { .ap-table { font-size: .75em; } #relecture { overflow-x: auto; } }

.ap-envoi { max-width: 46em; margin: 1.2em auto 0; padding-left: 1.3em; color: #666; font-size: .92em; line-height: 1.6; }
.ap-envoi li { margin: .3em 0; }
.ap-rgpd { text-align: center; color: #999; font-size: .85em; margin: .5em 0 0; }

/* Étape 1 : choix du jeu */
.ap-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(14em, 18em)); justify-content: center; gap: 1em; max-width: 40em; margin: .4em auto 0; }
.ap-choix-tuile { display: flex; flex-direction: column; align-items: center; gap: .25em; padding: 1em; border: 2px solid #e5e5e5; border-radius: 1em; text-align: center; color: #878787; text-decoration: none; background: #fff; }
.ap-choix-tuile .icon { font-size: 1.5em; color: #878787; }
.ap-choix-tuile strong { color: #444; font-family: 'Fredoka', 'Nunito', sans-serif; }
.ap-choix-tuile > span:last-child { font-size: .82em; }
a.ap-choix-tuile:hover { border-color: #5cc79a; }
.ap-choix-tuile.actif { border-color: #16855a; background: #eaf7f1; }
.ap-choix-tuile.actif .icon, .ap-choix-tuile.actif strong { color: #16855a; }
.ap-choix-tuile.bientot { opacity: .6; border-style: dashed; }

/* Accueil : « Essayez d'abord » */
.ap-vitrine-case { display: flex; flex-direction: column; gap: .7em; }
.ap-vitrine-case .carte { flex: 1; }
.ap-modifier { align-self: center; font-size: .85em; color: #16855a; font-weight: 700; text-decoration: none; }
.ap-modifier:hover { text-decoration: underline; }
.ap-cta { text-align: center; margin: 2.5em 0 0; }
.catalogue-grille.ap-vitrine { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 60em; margin: 0 auto; }
@media screen and (max-width: 840px) { .catalogue-grille.ap-vitrine { grid-template-columns: minmax(0, 1fr); max-width: 24em; } }
.catalogue-grille.ap-deux { grid-template-columns: repeat(auto-fit, minmax(17em, 24em)); justify-content: center; }
.ap-retour { text-align: center; margin: 2.5em 0 0; font-size: .9em; }
.ap-retour a { color: #16855a; font-weight: 700; text-decoration: none; }

/* Atelier des jeux : « Essayez d'abord », une pastille comme « New ! » et « Bêta », qui déroule les exemples */
.ap-essai { max-width: 64em; margin: 0 auto; text-align: center; }
.ap-essai > summary { list-style: none; display: inline-block; cursor: pointer; padding: .45em 1.3em; border-radius: 999px; background: #ffd84d; color: #2d3a35; border: solid 2px #2d3a35; box-shadow: .125em .175em 0 0 rgba(0,0,0,.2); font-family: Nunito, 'Segoe UI', Arial, sans-serif; font-size: 1.05em; font-weight: 800; letter-spacing: 1px; line-height: 1.3; transform: rotate(-3deg); animation: ap-essai-pop 2.4s ease-in-out infinite; }
.ap-essai > summary::-webkit-details-marker { display: none; }
.ap-essai > summary:hover { background: #ffe57a; }
.ap-essai > summary:focus-visible { outline: 3px solid #16855a; outline-offset: 3px; }
.ap-essai > summary .icon { margin-right: .3em; }
.ap-essai-sous { font-weight: 600; letter-spacing: 0; }
.ap-essai[open] > summary { animation: none; transform: none; background: #fff; margin-bottom: 2em; }
@keyframes ap-essai-pop { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(-3deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .ap-essai > summary { animation: none; } }

/* titre sur deux lignes (petits écrans) : les lignes ne se chevauchent plus */
#header #logo { line-height: 1.3; }
