/* /ce1-maths — les nombres jusqu'à 1000, le calcul et les problèmes du CE1
   (thème vallée des dinos de /ce1 ; le bandeau reçoit /commun/theme-ce1.css).
   Copie de /ce2-calcul/styles.css, re-thématisée avec la palette CE1 de
   /ce1-calcul : vert jungle foncé #1B5E29 pour le texte fort, sable #FFF3D6.
   Gros boutons, la question et le pavé tiennent sur un écran de tablette.
   Tout est préfixé « cc- ». */
@font-face{font-family:Quicksand;src:url("/lecture/polices/quicksand-600.woff2") format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:Quicksand;src:url("/lecture/polices/quicksand-700.woff2") format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:"Baloo 2";src:url("/ce1-fr/polices/baloo-2-latin-700-normal.woff2") format("woff2");font-weight:700;font-display:swap}

html,body{margin:0;background:#FFF3D6}
body{min-height:100vh;font-family:Quicksand,system-ui,-apple-system,"Segoe UI",sans-serif;font-weight:600;color:#2A2416;-webkit-tap-highlight-color:transparent}
.cc{--marine:#1B5E29;--doux:#6B5E45;--vert:#2B8A3E;--or:#E3A008;min-height:100vh;display:flex;flex-direction:column}
.cc *{box-sizing:border-box}
.cc a{color:inherit}
button{font:inherit}

/* ---------- bandeau ---------- */
.cc-barre{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:12px;padding:10px 14px}
.cc-retour{flex:none;display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#fff;color:var(--marine);font-size:24px;font-weight:700;text-decoration:none}
.cc-barre-t{flex:1;min-width:0;display:flex;flex-direction:column;color:var(--marine)}
.cc-barre-t b{font-family:"Baloo 2",Quicksand,sans-serif;font-size:clamp(20px,4.5vw,26px);line-height:1.1}
.cc-barre-t span{font-size:13px;color:#14506F;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-or{flex:none;padding:10px 14px;border-radius:999px;border:2px solid var(--or);color:#7A4E00;font-weight:700;font-size:18px;box-shadow:0 3px 0 var(--or)}
.cc-corps{width:100%;max-width:860px;margin:0 auto;padding:22px 16px 28px;flex:1;position:relative}
.piece-or{display:inline-block;width:1em;height:1em;border-radius:50%;vertical-align:-.14em;margin:0 .04em;flex:none;position:relative;
  background:radial-gradient(circle at 32% 28%,#FFFBD1 0 10%,#FFE066 24%,#FFC400 52%,#E09E00 78%,#B57A00 100%);
  box-shadow:inset 0 0 0 .07em #A86F00,inset 0 0 0 .15em #FFD84A,0 .05em .1em rgba(120,80,0,.35)}
.piece-or::after{content:"";position:absolute;inset:.27em;border-radius:50%;border:.06em solid rgba(150,95,0,.55)}
.cc-embleme{display:block;font-size:72px;line-height:1.1;text-align:center}

/* ---------- la droite graduée ---------- */
.cc-droite-zone{margin:6px auto 12px;max-width:560px}
.cc-droite{display:block;width:100%;height:auto}
.cc-droite .ligne{stroke:var(--marine);stroke-width:3}
.cc-droite .bout{fill:var(--marine)}
.cc-droite .trait{stroke:var(--marine);stroke-width:3}
.cc-droite .lab{font-family:"Baloo 2",Quicksand,sans-serif;font-size:30px;fill:var(--marine);text-anchor:middle}
.cc-droite .eti{fill:#FFF3BF;stroke:#E8590C;stroke-width:3}
.cc-droite .eti.vue{fill:#D3F9D8;stroke:#2B8A3E}
.cc-droite .v{font-family:"Baloo 2",Quicksand,sans-serif;font-size:24px;fill:#C2410C;text-anchor:middle}
.cc-droite .v.vue{fill:#1B5E29}
.cc-droite .fleche{fill:none;stroke:#E8590C;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}

/* ---------- accueil ---------- */
.cc-onglets{display:flex;gap:10px;justify-content:center;margin-bottom:16px}
.cc-onglet{flex:1;max-width:260px;text-align:center;padding:12px 14px;border-radius:999px;text-decoration:none;font-family:"Baloo 2",Quicksand,sans-serif;font-size:22px;
  background:#fff;color:var(--marine) !important;border:3px solid #EADFC6;box-shadow:0 4px 0 #EADFC6}
.cc-onglet.on{background:var(--marine);color:#fff !important;border-color:var(--marine);box-shadow:0 4px 0 #0F3D1A}
.cc-mission{display:flex;align-items:center;gap:16px;padding:16px 22px;margin-bottom:8px;border-radius:24px;text-decoration:none;
  background:#E07B12;color:#fff !important;box-shadow:0 6px 0 #A85A0A}
.cc-mission.faite{background:#1B5E29;box-shadow:0 6px 0 #0F3D1A}
.cc-mission.vide{background:#fff;color:var(--marine) !important;border:3px dashed #E07B12;box-shadow:none}
.cc-mission b{display:block;font-family:"Baloo 2",Quicksand,sans-serif;font-size:26px;line-height:1.1}
.cc-mission span span{font-size:16px;opacity:.92}
.cc-mission-ic{font-size:40px}
.cc-h2{font-family:"Baloo 2",Quicksand,sans-serif;font-size:26px;color:var(--marine);margin:22px 0 4px;text-align:center}
.cc-chapeau{text-align:center;margin:0 auto 18px;max-width:580px;color:var(--doux);font-size:16px;line-height:1.4}
.cc-etapes{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.cc-etape{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:16px 10px 14px;border-radius:22px;text-decoration:none;
  background:#fff;border:3px solid #EADFC6;box-shadow:0 5px 0 #EADFC6;text-align:center}
.cc-etape:active{transform:translateY(3px);box-shadow:0 2px 0 #EADFC6}
.cc-etape.conseil{border-color:#FD7E14;box-shadow:0 5px 0 #FD7E14}
.cc-etape.franchie{background:#F4FCE3;border-color:#82C91E;box-shadow:0 5px 0 #82C91E}
.cc-etape.defi{background:#1B5E29;border-color:#1B5E29;box-shadow:0 5px 0 #0F3D1A;color:#fff !important}
.cc-etape.defi .cc-etape-t{color:#fff}
.cc-etape.defi .cc-etape-num,.cc-etape.defi .cc-etape-s{color:#BFD9EA}
.cc-badge{position:absolute;top:-12px;left:50%;transform:translateX(-50%);white-space:nowrap;padding:3px 10px;border-radius:999px;background:#FD7E14;color:#fff;font-size:13px;font-weight:700}
.cc-etape-num{font-size:12px;letter-spacing:2px;text-transform:uppercase;color:var(--doux)}
.cc-etape-ic{font-size:34px;line-height:1.2}
.cc-etape-t{font-family:"Baloo 2",Quicksand,sans-serif;font-size:21px;line-height:1.15;color:var(--marine)}
.cc-etape-s{font-size:14px;color:var(--doux);min-height:2.4em;display:flex;align-items:center}
.cc-etape-et{font-size:22px;letter-spacing:3px;color:var(--or)}
.cc-etape-go{margin-top:6px;padding:8px 16px;border-radius:999px;background:#2B8A3E;color:#fff;font-weight:700;font-size:16px;box-shadow:0 3px 0 #1B5E29}
.cc-etape.defi .cc-etape-go{background:var(--or);box-shadow:0 3px 0 #9C6A00}
.cc-legende{text-align:center;color:var(--doux);font-size:14px;margin:16px auto 0;max-width:600px;line-height:1.4}

/* ---------- une question ---------- */
.cc-prog{display:flex;gap:5px;margin:0 auto 12px;max-width:760px}
.cc-prog span{flex:1;height:10px;border-radius:5px;background:#E9E1CC}
.cc-prog span.ok{background:#40C057}
.cc-prog span.ecl{background:#FAB005}
.cc-prog span.ko{background:#FA8C5A}
.cc-prog span.ici{background:#1B5E29}
.cc-carte{max-width:760px;margin:0 auto;background:#fff;border-radius:26px;padding:18px 18px 16px;box-shadow:0 5px 0 rgba(42,36,22,.1);border-top:8px solid #2B8A3E;text-align:center}
.cc-carte.mission{border-top-color:#E07B12}
.cc-carte.mission.intro{border-top-color:#7048E8}
.cc-intro{margin:0 0 6px;color:#7048E8;font-size:16px}
.cc-consigne{margin:0 0 10px;font-family:"Baloo 2",Quicksand,sans-serif;font-size:clamp(22px,5vw,30px);line-height:1.25;color:var(--marine)}
.cc-consigne.petite{font-size:clamp(19px,4.2vw,23px);margin-top:10px;color:#2B8A3E}
.cc-enonce{margin:2px 0 6px;font-size:clamp(19px,4.3vw,23px);line-height:1.45;text-align:left;font-weight:700;color:#2A2416}
.cc-question{margin:0 0 6px;font-size:clamp(19px,4.3vw,23px);line-height:1.4;text-align:left;font-weight:700;color:var(--marine)}
.cc-calcul{margin:6px 0;font-family:"Baloo 2",Quicksand,sans-serif;font-size:clamp(36px,9vw,52px);line-height:1.2;color:var(--marine);font-variant-numeric:tabular-nums}
.cc-calcul.grand{font-size:clamp(46px,12vw,68px)}
.cc-unite{font-size:.6em;color:var(--doux)}
.cc-case{display:inline-block;min-width:1.6em;padding:0 .18em;border-radius:14px;background:#F1F3F5;border-bottom:5px solid var(--marine);color:var(--marine);text-align:center;vertical-align:baseline}
.cc-case.vide{color:#ADB5BD}
.cc-case.juste{background:#D3F9D8;border-color:#2B8A3E;color:#1B5E29}
.cc-case.eclair{background:#FFF3BF;border-color:#FAB005;color:#7A4E00}
.cc-case.montre{background:#E7F5FF;border-color:#1C7ED6;color:#1864AB}
.cc-case.secoue{animation:cc-secoue .35s}
@keyframes cc-secoue{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.cc-meche{height:10px;border-radius:5px;background:#F1E9D2;margin:8px 4px 0;overflow:hidden}
.cc-meche span{display:block;height:100%;width:100%;border-radius:5px;background:linear-gradient(90deg,#FFD43B,#FD7E14);transform-origin:left;animation:cc-meche linear forwards}
.cc-meche.eteinte span{opacity:.25}
.cc-meche.arrete span{animation-play-state:paused}
@keyframes cc-meche{to{transform:scaleX(0)}}

.cc-choix-zone{display:grid;grid-template-columns:1fr;gap:12px;max-width:620px;margin:12px auto 4px}
.cc-choix-zone.deux{grid-template-columns:1fr 1fr;max-width:420px}
.cc-choix{min-height:66px;padding:10px 16px;border:4px solid #2B8A3E;border-radius:20px;background:#fff;cursor:pointer;font-family:"Baloo 2",Quicksand,sans-serif;font-size:28px;color:var(--marine);box-shadow:0 5px 0 #2B8A3E;line-height:1.2}
.cc-choix.long{font-family:Quicksand,sans-serif;font-weight:700;font-size:20px}
.cc-choix.schema{padding:8px}
.cc-choix:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 #2B8A3E}
.cc-choix:disabled{cursor:default;opacity:.5}
.cc-choix.bon{opacity:1;background:#EBFBEE;color:#1B5E29}
.cc-choix.faux{border-color:#FD7E14;background:#FFF4E6;box-shadow:0 5px 0 #FD7E14}
.cc-schema-c{display:block}

/* les schémas en barres */
.cc-schema{display:block;width:100%;max-width:560px;height:auto;margin:0 auto}
.cc-schema .p1{fill:#FFE8A3;stroke:#C98A00;stroke-width:2.5}
.cc-schema .p2{fill:#C5F6FA;stroke:#1098AD;stroke-width:2.5}
.cc-schema .ecart{fill:#fff;stroke:#FD7E14;stroke-width:2.5;stroke-dasharray:7 5}
.cc-schema .acc{fill:none;stroke:var(--marine);stroke-width:2.5;stroke-linejoin:round}
.cc-schema text{font-family:"Baloo 2",Quicksand,sans-serif;font-size:26px;fill:var(--marine);text-anchor:middle}
.cc-schema text.q{fill:#D9480F;font-size:26px}
.cc-schema text.nom{text-anchor:end;font-family:Quicksand,sans-serif;font-weight:700;font-size:17px;fill:var(--doux)}
.cc-schema text.pet{font-family:Quicksand,sans-serif;font-weight:700;font-size:16px;fill:var(--doux)}
.cc-schema-zone{margin:10px auto 4px;max-width:520px;background:#fff;border-radius:16px;padding:8px}

/* l'opération posée */
.cc-pose{display:inline-flex;flex-direction:column;gap:4px;margin:8px auto 4px;padding:10px 14px;border-radius:18px;background:#FFFBF2;
  border:2px solid #EADFC6;font-family:"Baloo 2",Quicksand,sans-serif}
.cc-ligne{display:flex;gap:4px;align-items:center}
.cc-signe{width:40px;font-size:34px;color:var(--marine);text-align:center}
.cc-cell{width:52px;height:56px;display:grid;place-items:center;font-size:36px;color:var(--marine);border-radius:10px}
.cc-cell.vide{visibility:hidden}
.cc-cell.donne{color:#868E96}
.cc-cell.saisie{border:3px solid #CED4DA;background:#fff;cursor:pointer;padding:0;font-family:inherit}
.cc-cell.saisie.ici{border-color:#1C7ED6;box-shadow:0 0 0 3px #A5D8FF}
.cc-cell.saisie.faux{border-color:#FD7E14;background:#FFF4E6}
.cc-cell.saisie.juste{border-color:#40C057;background:#EBFBEE}
.cc-cell.saisie.montre{border-color:#1C7ED6;background:#E7F5FF;color:#1864AB}
.cc-ligne.retenues .cc-signe,.cc-ligne.retenues .cc-cell{height:34px}
.cc-ret{width:52px;height:34px;border:2px dashed #E9C46A;border-radius:8px;background:transparent;color:#D9480F;font-family:inherit;font-size:22px;cursor:pointer;padding:0}
.cc-trait{height:4px;border-radius:2px;background:var(--marine);margin:2px 0}

/* le pavé */
.cc-bas{max-width:760px;margin:0 auto}
.cc-pave{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-width:380px;margin:14px auto 0}
.cc-touche{min-height:64px;border:0;border-radius:16px;background:#fff;color:var(--marine);font-family:"Baloo 2",Quicksand,sans-serif;font-size:30px;cursor:pointer;box-shadow:0 5px 0 #D8CCAE}
.cc-touche:active{transform:translateY(3px);box-shadow:0 2px 0 #D8CCAE}
.cc-touche.efface{background:#F1F3F5}
.cc-touche.valide{background:#2B8A3E;color:#fff;box-shadow:0 5px 0 #1B5E29}
.cc-passer{display:block;margin:14px auto 0;border:0;background:none;color:#7048E8;font-size:18px;cursor:pointer;text-decoration:underline;text-underline-offset:4px}

/* le retour */
.cc-fb-zone{max-width:760px;margin:12px auto 0}
.cc-fb-zone:empty{display:none}
.cc-fb{position:relative;border-radius:22px;padding:14px 18px;animation:cc-monte .2s ease-out;text-align:center}
@keyframes cc-monte{from{opacity:0;transform:translateY(8px)}}
.cc-fb.ok{background:#EBFBEE;border:3px solid #40C057}
.cc-fb.eclair{background:#FFF9DB;border:3px solid #FAB005}
.cc-fb.ko{background:#FFF4E6;border:3px solid #FD7E14}
.cc-fb-t{font-family:"Baloo 2",Quicksand,sans-serif;font-size:26px;color:var(--marine);display:flex;justify-content:center;gap:12px;flex-wrap:wrap}
.cc-gain{color:#7A4E00}
.cc-fb-s{margin:6px 0 0;font-size:17px;color:var(--doux)}
.cc-fb-s.or{color:#7A4E00;font-weight:700}
.cc-astuce{margin:8px 0 0;padding:10px 14px;border-radius:14px;background:#fff;font-size:17px;line-height:1.45}
.cc-astuce-zone{display:flex;align-items:center;gap:10px;text-align:left;margin-top:6px}
.cc-astuce-zone .cc-astuce{flex:1;margin:0}
.cc-piece-vol{position:absolute;top:10px;font-size:22px;animation:cc-vol 1.1s ease-out forwards;pointer-events:none}
@keyframes cc-vol{to{transform:translateY(-90px);opacity:0}}
.cc-suite{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:12px}
.cc-go{display:inline-flex;align-items:center;justify-content:center;min-height:56px;padding:12px 26px;border:0;border-radius:999px;cursor:pointer;
  background:#2B8A3E;color:#fff !important;font-family:Quicksand,sans-serif;font-weight:700;font-size:19px;text-decoration:none;box-shadow:0 5px 0 #1B5E29}
.cc-go:active{transform:translateY(3px);box-shadow:0 2px 0 #1B5E29}
.cc-go.clair{background:#fff;color:var(--marine) !important;box-shadow:0 5px 0 rgba(11,57,84,.25)}
.cc-lien{border:0;background:none;color:inherit;cursor:pointer;text-decoration:underline;padding:0}

/* fin */
.cc-fin{text-align:center}
.cc-fin-t{font-family:"Baloo 2",Quicksand,sans-serif;font-size:clamp(28px,6vw,38px);color:var(--marine);margin:10px 0 4px}
.cc-fin-score{font-size:20px;margin:0}
.cc-fin-et{font-size:46px;letter-spacing:6px;color:var(--or);margin:0}
.cc-fin-s{font-size:17px;color:var(--doux);max-width:560px;margin:8px auto}
.cc-franchie{display:flex;flex-direction:column;gap:4px;max-width:520px;margin:12px auto;padding:14px 18px;border-radius:20px;background:#F4FCE3;border:3px solid #82C91E}
.cc-franchie b{font-family:"Baloo 2",Quicksand,sans-serif;font-size:26px;color:#2B8A3E}
.cc-coffre{position:relative;display:inline-flex;flex-direction:column;align-items:center;gap:2px;margin:12px auto;padding:12px 26px;border-radius:20px;background:#FFF3C4;border:3px solid var(--or);color:#7A4E00}
.cc-coffre-ic{font-size:34px}
.cc-coffre b{font-size:22px}

/* parents */
.cc-parents h2{font-family:"Baloo 2",Quicksand,sans-serif;color:var(--marine);margin:22px 0 6px}
.cc-parents h3{color:var(--marine);margin:14px 0 6px}
.cc-liste li{margin-bottom:8px;line-height:1.45}
.cc-tab-zone{overflow-x:auto}
.cc-tab{border-collapse:collapse;width:100%;background:#fff;border-radius:12px;font-size:15px}
.cc-tab th,.cc-tab td{padding:8px 10px;border-bottom:1px solid #EADFC6;text-align:left}
.cc-porte{max-width:360px;margin:30px auto;text-align:center;display:flex;flex-direction:column;gap:12px}
.cc-champ{font-size:24px;padding:10px;border-radius:12px;border:2px solid #CED4DA;text-align:center}
.cc-pied{text-align:center;padding:10px 16px 24px;color:var(--doux);font-size:15px}
.cc-pied-l{margin:10px 0}

@media (max-width:760px){ .cc-etapes{grid-template-columns:1fr 1fr} }
@media (max-width:480px){
  .cc-etapes{grid-template-columns:1fr}
  .cc-cell,.cc-ret{width:42px}
  .cc-cell{height:48px;font-size:30px}
  .cc-signe{width:28px;font-size:28px}
  .cc-pose{padding:8px}
}

/* ---------- le choix avant une étape, l'exemple, l'aide « ensemble » ---------- */
.cc-choix-page{max-width:640px;text-align:center}
.cc-choix-ic{font-size:56px;margin:4px 0}
.cc-chemin{display:flex;align-items:center;gap:16px;width:100%;margin:14px 0;padding:16px 20px;border-radius:22px;text-align:left;text-decoration:none;cursor:pointer;
  font:inherit;color:var(--marine) !important;background:#fff;border:4px solid #2B8A3E;box-shadow:0 6px 0 #1B5E29}
.cc-chemin:active{transform:translateY(3px);box-shadow:0 3px 0 #1B5E29}
.cc-chemin.montre{background:#EBFBEE}
.cc-chemin-ic{flex:none;font-size:42px;line-height:1}
.cc-chemin b{display:block;font-family:"Baloo 2",Quicksand,sans-serif;font-size:25px;line-height:1.1}
.cc-chemin small{display:block;font-size:16px;color:var(--doux);margin-top:4px;line-height:1.35}
.cc-montre-t{display:inline-block;margin:0 0 6px;padding:6px 14px;border-radius:999px;background:#D3F9D8;color:var(--marine);font-weight:700;font-size:17px}
.cc-montre-dit{font-size:20px;color:var(--marine);line-height:1.45;max-width:640px;margin:12px auto 0}
.cc-montre-pas{display:flex;gap:8px;justify-content:center;margin:16px 0 4px}
.cc-montre-pas span{width:12px;height:12px;border-radius:50%;background:#E3DCEC}
.cc-montre-pas span.vu{background:#B2F2BB}
.cc-montre-pas span.ici{background:#2B8A3E}
.cc-pose.statique{display:inline-flex;margin:8px auto}
.cc-ensemble,.cc-seul{margin:0 0 12px;padding:10px 14px;border-radius:16px;font-size:17px;line-height:1.4;text-align:left}
.cc-ensemble{background:#FFF8E1;border:2px dashed #E3A008;color:#6B4A00}
.cc-seul{background:#EBFBEE;border:2px solid #40C057;color:#1B5E29}
.cc-img{margin:8px auto}
/* téléphone : les onglets tiennent sur la largeur */
@media (max-width:480px){ .cc-onglet{min-width:0;flex:1 1 0;font-size:16px;padding:10px 6px} }
/* téléphone : un calcul long (70 + ? = 100) tient sur la largeur */
@media (max-width:480px){ .cc-calcul:not(.mots){font-size:clamp(34px,11vw,52px)} }
.cc-rappel{font-size:16px;opacity:.85;background:#FFF8E1;border-radius:12px;padding:6px 10px}

/* l'heure : dessins et horloge à régler (/commun/heure.js) */
.cc-geo-img{display:flex;justify-content:center;margin:10px auto 6px;max-width:100%}
.cc-geo-img svg{max-width:100%;height:auto}
