/* ============================================================
   Cooking simulator - totk.wism.fr
   Palette aligned on the site (Zonai green on dark green)
   ============================================================ */

.cook-app {
    max-width: 1100px;
    margin: 0 auto 40px;
    color: #e6fff6;
    font-family: Oxanium, sans-serif;
}

.cook-intro {
    text-align: center;
    color: #aaccc3;
    line-height: 1.6;
    margin: 0 auto 26px;
    max-width: 760px;
    padding: 0 12px;
}

.cook-intro h1 {
    font-size: 1.9em;
    color: #fff;
    margin: 0 0 10px;
    text-shadow: 0 0 12px rgba(37, 227, 160, .35);
}

.cook-intro strong { color: #25E3A0; }

/* ---------- pot + result ---------- */

.cook-board {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 26px;
}

.cook-panel {
    background: linear-gradient(135deg, #050c0a 0%, #0d1e18 100%);
    border: 2px solid #147A56;
    border-radius: 10px;
    padding: 16px;
    box-sizing: border-box;
}

.cook-panel h2 {
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #25E3A0;
    margin: 0 0 14px;
}

.cook-pot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.cook-slot {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    border: 2px dashed #1d5c47;
    background: rgba(255, 255, 255, .03);
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}

.cook-slot.empty { cursor: default; }

.cook-slot.filled {
    border-style: solid;
    border-color: #25E3A0;
    background: rgba(37, 227, 160, .08);
    box-shadow: 0 0 12px rgba(37, 227, 160, .25);
}

.cook-slot.filled:hover {
    transform: translateY(-2px);
    border-color: #ff8a80;
    box-shadow: 0 0 14px rgba(255, 138, 128, .45);
}

.cook-slot img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.cook-slot-plus {
    color: #1d5c47;
    font-size: 24px;
    line-height: 1;
}

.cook-slot-glyph {
    font-size: 22px;
    line-height: 1;
}

.cook-slot-text {
    font-size: 10px;
    text-align: center;
    color: #c3f0e9;
    line-height: 1.2;
    word-break: break-word;
}

.cook-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.cook-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 6px;
    border: 1px solid #147A56;
    background: rgba(37, 227, 160, .1);
    color: #c3f0e9;
    font-family: inherit;
    font-size: .85em;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.cook-btn:hover:not(:disabled) {
    background: #25E3A0;
    color: #050c0a;
}

.cook-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ---------- result card ---------- */

.cook-placeholder {
    color: #7fa89d;
    text-align: center;
    margin: 30px 0;
    line-height: 1.6;
}

.cook-meal-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.cook-meal-icon {
    width: 96px;
    height: 96px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(37, 227, 160, .35));
}

.cook-meal-name {
    margin: 0 0 6px;
    font-size: 1.35em;
    color: #fff;
}

.cook-meal.failed .cook-meal-name { color: #ff9e80; }

.cook-meal-desc {
    margin: 0;
    color: #9fbdb4;
    font-size: .9em;
    line-height: 1.5;
}

.cook-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.cook-stat {
    background: rgba(255, 255, 255, .04);
    border-left: 3px solid #147A56;
    border-radius: 4px;
    padding: 8px 10px;
}

.cook-stat-key {
    display: block;
    font-size: .72em;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #7fa89d;
    margin-bottom: 2px;
}

.cook-stat-val {
    color: #25E3A0;
    font-size: 1.05em;
}

.cook-rng {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(255, 193, 7, .08);
    border-left: 3px solid #ffc107;
    color: #ffd97d;
    font-size: .85em;
    line-height: 1.5;
}

/* ---------- ingredient picker ---------- */

.cook-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cook-toolbar input {
    flex: 1;
    min-width: 180px;
    padding: 9px 12px;
    border-radius: 6px;
    border: 1px solid #147A56;
    background: rgba(255, 255, 255, .05);
    color: #e6fff6;
    font-family: inherit;
    font-size: .9em;
}

.cook-toolbar input::placeholder { color: #6d9187; }

.cook-count {
    color: #7fa89d;
    font-size: .82em;
    white-space: nowrap;
}

.cook-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.cook-filter {
    padding: 6px 12px;
    border-radius: 14px;
    border: 1px solid #147A56;
    background: transparent;
    color: #9fbdb4;
    font-family: inherit;
    font-size: .8em;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.cook-filter:hover { color: #25E3A0; }

.cook-filter.active {
    background: #25E3A0;
    border-color: #25E3A0;
    color: #050c0a;
    font-weight: bold;
}

.cook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    max-height: 460px;
    overflow-y: auto;
    padding-right: 4px;
}

.cook-ing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .04);
    color: #c3f0e9;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .15s;
}

.cook-ing:hover {
    background: rgba(37, 227, 160, .12);
    border-color: #25E3A0;
    transform: translateY(-2px);
}

.cook-ing-art {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #25E3A0;
}

.cook-ing-art img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.cook-ing-name {
    font-size: .7em;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
}

.cook-empty {
    color: #7fa89d;
    padding: 20px;
    text-align: center;
}

.cook-app.loading .cook-grid,
.cook-app.loading .cook-filters { opacity: .35; }

.cook-notes {
    margin-top: 26px;
    color: #9fbdb4;
    font-size: .88em;
    line-height: 1.7;
}

.cook-notes h2 {
    color: #25E3A0;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.cook-notes a { color: #00d89b; }

/* Sentinelle du pot colle : invisible et sans effet hors mobile
   (en display:none elle ne prend pas de cellule dans la grille .cook-board). */
.cook-pot-sentinel {
    display: none;
    height: 1px;
    margin-bottom: -1px;
}

/* Cale-pied : prend la place du pot quand celui-ci passe en position:fixed,
   pour que la hauteur du document ne change pas (sinon le scroll saute). */
.cook-pot-spacer {
    display: none;
    height: 0;
}

/* ---------- mobile ---------- */

@media (max-width: 860px) {
    /* display:contents sort les deux panneaux de la grille : le panneau "pot"
       devient un enfant direct de .cook-app, donc son sticky reste collé
       pendant tout le scroll de la liste d'ingredients (et pas seulement
       sur la hauteur de .cook-board). */
    .cook-board {
        display: contents;
    }

    .cook-panel-pot,
    .cook-panel-result { margin-bottom: 18px; }

    /* plus de scroll interne sur mobile : la liste suit le scroll de la page,
       et c'est le pot colle en haut qui reste visible par dessus. */
    .cook-grid {
        max-height: none;
        overflow: visible;
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    }
    .cook-meal-icon { width: 72px; height: 72px; }
    .cook-slot { width: 62px; height: 62px; }
    .cook-slot img { width: 48px; height: 48px; }

    /* ---------- pot colle en haut de l'ecran ---------- */

    .cook-pot-sentinel { display: block; }
    .cook-pot-spacer   { display: block; }

    .cook-panel-pot {
        /* opaque : le reste de la page doit passer dessous sans transparaitre */
        background: #071310;
        transition: box-shadow .18s ease;
    }

    /* Etat "colle" (classe posee par ui-v6.js via IntersectionObserver).

       position:fixed et pas sticky : en sticky le panneau garde sa place dans
       le flux, donc le compactage ci-dessous raccourcissait la page en plein
       scroll et la vue remontait toute seule. En fixed il sort du flux, et
       .cook-pot-spacer occupe sa hauteur d'origine a sa place. */
    .cook-panel-pot.is-stuck {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 30;
        padding: 8px 10px;
        border-top-color: transparent;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
    }

    .cook-panel-pot.is-stuck h2,
    .cook-panel-pot.is-stuck .cook-skip { display: none; }

    .cook-panel-pot.is-stuck .cook-pot { gap: 6px; }

    .cook-panel-pot.is-stuck .cook-slot { width: 52px; height: 52px; }
    .cook-panel-pot.is-stuck .cook-slot img { width: 40px; height: 40px; }
    .cook-panel-pot.is-stuck .cook-slot-text { display: none; }

    .cook-panel-pot.is-stuck .cook-actions { margin-top: 8px; }
    .cook-panel-pot.is-stuck .cook-btn { padding: 7px 10px; font-size: .8em; }
}

@media (prefers-reduced-motion: reduce) {
    .cook-panel-pot { transition: none; }
}

/* ============================================================
   Bouton COOK, animation de cuisson, case "skip"
   ============================================================ */

.cook-skip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 2px 0;
    color: #7fa89d;
    font-size: .8em;
    cursor: pointer;
    user-select: none;
}

.cook-skip input {
    width: 15px;
    height: 15px;
    accent-color: #25E3A0;
    cursor: pointer;
    flex-shrink: 0;
}

.cook-skip:hover { color: #9fbdb4; }

/* ---------- bouton COOK ---------- */

.cook-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 0;
}

.cook-ready {
    margin: 0;
    color: #7fa89d;
    font-size: .85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cook-cta {
    padding: 15px 52px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #25E3A0, #12a877);
    color: #04140f;
    font-family: inherit;
    font-size: 1.35em;
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 5px 0 #0b6b4c, 0 8px 22px rgba(37, 227, 160, .35);
    transition: transform .12s, box-shadow .12s, background .2s;
}

.cook-cta:hover {
    background: linear-gradient(145deg, #4AFABE, #16c78c);
    box-shadow: 0 5px 0 #0b6b4c, 0 10px 28px rgba(37, 227, 160, .55);
}

.cook-cta:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #0b6b4c, 0 4px 12px rgba(37, 227, 160, .4);
}

/* ---------- animation de cuisson ---------- */

.cook-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0 18px;
}

.cook-anim {
    position: relative;
    width: 100%;
    height: 170px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.cook-anim-ring {
    position: absolute;
    bottom: 6px;
    width: 130px;
    height: 130px;
    border: 2px dashed rgba(37, 227, 160, .5);
    border-radius: 50%;
    animation: cookSpin 3s linear infinite, cookGlow 1.2s ease-in-out infinite;
}

.cook-anim-pot {
    position: relative;
    font-size: 62px;
    line-height: 1;
    animation: cookShake .45s ease-in-out infinite;
    filter: drop-shadow(0 0 14px rgba(37, 227, 160, .5));
}

.cook-anim-items {
    position: absolute;
    top: 0;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cook-anim-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 24px;
    opacity: 0;
    animation: cookDropIn 1.5s ease-in forwards;
}

.cook-anim-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.cook-anim-label {
    margin: 10px 0 0;
    color: #25E3A0;
    font-size: .95em;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: cookBlink 1s ease-in-out infinite;
}

@keyframes cookShake {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50%      { transform: rotate(5deg) translateY(-4px); }
}

@keyframes cookSpin {
    to { transform: rotate(360deg); }
}

@keyframes cookGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(37, 227, 160, .2); border-color: rgba(37, 227, 160, .35); }
    50%      { box-shadow: 0 0 28px rgba(37, 227, 160, .55); border-color: rgba(37, 227, 160, .8); }
}

@keyframes cookDropIn {
    0%   { opacity: 0; transform: translateY(-24px) scale(1) rotate(0deg); }
    12%  { opacity: 1; }
    65%  { opacity: 1; transform: translateY(72px) scale(.6) rotate(180deg); }
    100% { opacity: 0; transform: translateY(100px) scale(.15) rotate(360deg); }
}

@keyframes cookBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: .45; }
}

/* ---------- apparition du plat ---------- */

.cook-reveal { animation: cookReveal .45s cubic-bezier(.2, .9, .3, 1.4); }

@keyframes cookReveal {
    0%   { opacity: 0; transform: scale(.88); }
    100% { opacity: 1; transform: scale(1); }
}

/* ---------- accessibilité ---------- */

@media (prefers-reduced-motion: reduce) {
    .cook-anim-pot,
    .cook-anim-ring,
    .cook-anim-item,
    .cook-anim-label,
    .cook-reveal { animation: none; }
}

@media (max-width: 860px) {
    .cook-cta { width: 100%; padding: 15px 20px; }
    .cook-anim { height: 150px; }
    .cook-anim-pot { font-size: 52px; }
}

/* ============================================================
   Pages guides par effet (totk-<effet>-recipes.html)
   Même palette que le simulateur : vert Zonai sur vert sombre.
   ============================================================ */

.cook-guide {
    max-width: 1100px;
    margin: 0 auto 40px;
    color: #e6fff6;
    font-family: Oxanium, sans-serif;
    padding: 0 12px;
    box-sizing: border-box;
}

.cook-crumbs {
    font-size: .85em;
    color: #7fae9f;
    margin-bottom: 14px;
}

.cook-crumbs a { color: #25E3A0; text-decoration: none; }
.cook-crumbs a:hover { text-decoration: underline; }
.cook-crumbs span { margin: 0 4px; }

.cook-guide h1 {
    font-size: 1.9em;
    color: #fff;
    margin: 0 0 12px;
    text-shadow: 0 0 12px rgba(37, 227, 160, .35);
}

.cook-guide h2 {
    font-size: 1.15em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #25E3A0;
    margin: 32px 0 12px;
}

.cook-guide h3 {
    font-size: 1em;
    color: #fff;
    margin: 0 0 10px;
}

.cook-guide p { line-height: 1.6; color: #cfeade; }
.cook-guide a { color: #25E3A0; }

.cook-guide-intro { font-size: 1.05em; color: #e6fff6; }
.cook-guide-note  { font-size: .9em;  color: #9dc4b6; }

/* ---------- les trois marmites ---------- */

.cook-guide-combos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.cook-guide-combo {
    background: linear-gradient(135deg, #050c0a 0%, #0d1e18 100%);
    border: 2px solid #147A56;
    border-radius: 10px;
    padding: 16px;
    box-sizing: border-box;
}

.cook-combo-pot {
    font-size: .95em;
    color: #e6fff6;
    margin: 0 0 12px;
}

.cook-combo-meal {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
}

.cook-combo-meal strong { color: #25E3A0; font-size: 1.05em; }

.cook-combo-stats {
    margin: 0 0 12px;
    padding: 0;
    border-top: 1px solid #147A56;
}

.cook-combo-stats div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(20, 122, 86, .4);
}

.cook-combo-stats dt { color: #7fae9f; font-size: .85em; text-transform: uppercase; letter-spacing: .5px; }
.cook-combo-stats dd { margin: 0; color: #fff; font-weight: 700; text-align: right; }

.cook-combo-why { font-size: .85em; color: #9dc4b6; margin: 0 0 12px; }

.cook-guide-combo .cook-btn { text-align: center; text-decoration: none; display: block; }

/* ---------- tableau des ingrédients ---------- */

.cook-guide-table-wrap { overflow-x: auto; }

.cook-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92em;
    background: #050c0a;
    border: 2px solid #147A56;
    border-radius: 10px;
}

.cook-guide-table th,
.cook-guide-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(20, 122, 86, .45);
}

.cook-guide-table thead th {
    color: #25E3A0;
    text-transform: uppercase;
    font-size: .78em;
    letter-spacing: 1px;
    white-space: nowrap;
}

.cook-guide-table tbody th {
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.cook-guide-table tbody th img { vertical-align: middle; margin-right: 8px; }
.cook-guide-table tbody tr:hover { background: rgba(20, 122, 86, .18); }

/* ---------- maillage entre guides ---------- */

.cook-guide-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.cook-guide-links a {
	color:#147A56;
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #147A56;
    border-radius: 999px;
    text-decoration: none;
    font-size: .88em;
}

.cook-guide-links a:hover { border-color: #25E3A0; background: rgba(37, 227, 160, .12); }

.cook-guide-hub { margin-bottom: 26px; }

/* Grille rendue côté serveur, remplacée par le JS au chargement :
   même apparence que les tuiles cliquables, mais inerte. */
.cook-ing-static { cursor: default; }
