/* ══ C'est Prêt & Toque — Front CSS ══ */

.cpt-galerie, .cpt-commande {
    font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    color: #131109;
    line-height: 1.6;
}

/* ══ GALERIE ══ */
.cpt-galerie .cpt-week-section { margin-bottom: 60px; }

.cpt-galerie .cpt-week-header { display: flex; align-items: baseline; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid #EDE7DC; margin-bottom: 28px; flex-wrap: wrap; }
.cpt-galerie .cpt-week-eyebrow { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: #B8512F; white-space: nowrap; flex-shrink: 0; }
.cpt-galerie .cpt-week-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; font-style: italic; font-size: 2rem; color: #131109; margin: 0; line-height: 1.15; }

.cpt-recipes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.cpt-recipe-card { background: #F6F1E9; overflow: hidden; transition: transform .28s, box-shadow .28s; }
.cpt-recipe-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(19,17,9,.08); }

.cpt-card-img { overflow: hidden; aspect-ratio: 4/3; }
.cpt-card-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82); transition: transform .65s; display: block; }
.cpt-recipe-card:hover .cpt-card-img img { transform: scale(1.06); }

.cpt-card-body { padding: 20px 22px 24px; }
.cpt-card-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; font-size: 1.5rem; color: #131109; margin: 0 0 10px; line-height: 1.2; }
.cpt-card-desc { font-size: .9rem; line-height: 1.75; color: #9A9389; margin: 0 0 12px; }
.cpt-card-allerg { font-size: .78rem; color: #C9C2B8; margin: 0; }
.cpt-allerg-label { color: #9A9389; font-weight: 400; }
.cpt-empty { font-size: .95rem; color: #9A9389; font-style: italic; padding: 40px 0; text-align: center; }

/* ══ COMMANDE ══ */

/* ── Toggle mode ── */
.cpt-mode-toggle { display: flex; gap: 8px; margin-bottom: 36px; border-bottom: 1px solid #EDE7DC; padding-bottom: 0; }
#cpt-wrap .cpt-mode-btn {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 10px 20px 12px;
    font-family: 'Jost', sans-serif;
    font-size: .82rem;
    font-weight: 300;
    letter-spacing: .08em;
    text-transform: none;
    color: #9A9389;
    cursor: pointer;
    transition: color .2s, border-color .2s;
    margin-bottom: -1px;
    outline: none;
}
#cpt-wrap .cpt-mode-btn.active {
    background: transparent !important;
    background-color: transparent !important;
    color: #131109 !important;
    border-bottom: 2px solid #B8512F !important;
    box-shadow: none !important;
}
#cpt-wrap .cpt-mode-btn:hover,
#cpt-wrap .cpt-mode-btn:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: #B8512F !important;
    box-shadow: none !important;
}
#cpt-wrap .cpt-mode-btn.active:hover {
    color: #131109 !important;
}

/* ── Étapes ── */
.cpt-step-label { font-size: .52rem; letter-spacing: .22em; text-transform: uppercase; color: #B8512F; margin: 0 0 8px; }
.cpt-step-title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; font-size: 1.9rem; color: #131109; margin: 0 0 6px; line-height: 1.15; }
.cpt-step-sub { font-size: .86rem; color: #9A9389; margin: 0 0 28px; line-height: 1.65; }
.cpt-step-actions { display: flex; gap: 14px; align-items: center; margin-top: 28px; flex-wrap: wrap; }

/* ── Formule cards ── */
.cpt-formule-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.cpt-formule-card { flex: 1; min-width: 140px; border: 1px solid #EDE7DC; padding: 16px 18px; cursor: pointer; transition: border-color .2s, background .2s; display: flex; flex-direction: column; gap: 4px; }
.cpt-formule-card input[type="radio"] { display: none; }
.cpt-formule-card:hover { border-color: #E8B09A; background: #fef8f4; }
.cpt-formule-card.is-selected { border-color: #B8512F; background: #fef0e8; }
.cpt-fc-name { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 1.2rem; color: #131109; line-height: 1.2; }
.cpt-fc-sub { font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: #9A9389; }

/* ── Grille champs ── */
.cpt-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; margin-bottom: 10px; }
.cpt-field-full { grid-column: 1 / -1; }

.cpt-field label { display: block; font-size: .54rem; letter-spacing: .18em; text-transform: uppercase; color: #9A9389; margin-bottom: 8px; }
.cpt-req { color: #B8512F; }
.cpt-field-note { font-size: .75rem; color: #C9C2B8; margin: 6px 0 0; line-height: 1.55; }

.cpt-field input, .cpt-field select, .cpt-field textarea {
    width: 100%; padding: 10px 13px; font-family: 'Jost', sans-serif; font-weight: 300; font-size: .92rem;
    color: #131109; background: #F6F1E9; border: 1px solid #EDE7DC; border-radius: 0; -webkit-appearance: none; appearance: none;
    transition: border-color .2s; box-sizing: border-box;
}
.cpt-field input:focus, .cpt-field select:focus, .cpt-field textarea:focus { outline: none; border-color: #B8512F; background: #fdf8f3; }
.cpt-field textarea { resize: vertical; min-height: 80px; line-height: 1.65; }

/* ── Recettes sélectionnables — compact ── */
.cpt-form-week-block { margin-bottom: 24px; }
.cpt-form-week-label { display: flex; align-items: center; gap: 10px; font-size: .55rem; letter-spacing: .18em; text-transform: uppercase; color: #B8512F; margin-bottom: 10px; }
.cpt-fwl-badge { border: 1px solid rgba(184,81,47,.3); padding: 2px 9px; font-size: .5rem; white-space: nowrap; }
.cpt-week-empty { font-size: .82rem; color: #C9C2B8; font-style: italic; padding: 8px 0; }

/* Layout compact : grille 2 col */
.cpt-form-recipes { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }

.cpt-form-recipe {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border: 1px solid #EDE7DC;
    cursor: pointer;
    transition: border-color .18s, background .18s;
    position: relative;
}
.cpt-form-recipe:hover { border-color: #E8B09A; background: #fef8f4; }
.cpt-form-recipe.is-selected { border-color: #B8512F; background: #fef0e8; }

.cpt-form-thumb { width: 38px; height: 38px; object-fit: cover; flex-shrink: 0; filter: saturate(.8); }
.cpt-form-thumb-placeholder { width: 38px; height: 38px; background: #EDE7DC; flex-shrink: 0; display: block; }

/* Nom uniquement, en avant */
.cpt-frn { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 1rem; color: #131109; line-height: 1.2; flex: 1; min-width: 0; }
/* Allergènes : très discrets */
.cpt-fra { display: none; } /* cachés dans la vue compacte */

.cpt-check-circle {
    width: 18px; height: 18px; border: 1px solid #C9C2B8; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 10px; color: transparent;
    transition: background .18s, border-color .18s;
}
.cpt-form-recipe.is-selected .cpt-check-circle { background: #B8512F; border-color: #B8512F; color: #fff; }
.cpt-form-recipe.is-selected .cpt-check-circle::after { content: '✓'; }

/* ── Messages ── */
#cpt-messages, #cpt-messages-contact { margin-bottom: 18px; }
.cpt-msg-error { background: #fef2f2; border-left: 3px solid #ef4444; padding: 10px 14px; font-size: .84rem; color: #7f1d1d; margin-bottom: 5px; }

/* ── Boutons ── */
.cpt-btn-next, .cpt-btn-submit {
    font-family: 'Jost', sans-serif; font-weight: 300; font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
    color: #F6F1E9; background: #131109; border: none; padding: 13px 32px; cursor: pointer;
    transition: background .2s, transform .15s;
}
.cpt-btn-next:hover, .cpt-btn-submit:hover:not(:disabled) { background: #B8512F; transform: translateY(-2px); }
.cpt-btn-next:disabled, .cpt-btn-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.cpt-btn-prev {
    font-family: 'Jost', sans-serif; font-weight: 300; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
    color: #9A9389; background: none; border: 1px solid #EDE7DC; padding: 12px 20px; cursor: pointer;
    transition: border-color .2s, color .2s;
}
.cpt-btn-prev:hover { border-color: #131109; color: #131109; }

.cpt-form-note { font-size: .78rem; color: #C9C2B8; line-height: 1.65; margin: 16px 0 0; }

/* ── Notice vide ── */
.cpt-notice-empty { background: #F6F1E9; border-left: 3px solid #EDE7DC; padding: 14px 18px; font-size: .88rem; color: #9A9389; margin-bottom: 28px; font-style: italic; }

/* ── Confirmation ── */
.cpt-confirmation { text-align: center; padding: 64px 40px; }
.cpt-confirm-icon { width: 56px; height: 56px; background: #B8512F; color: #fff; font-size: 1.4rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.cpt-confirmation h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; font-size: 2rem; color: #131109; margin: 0 0 12px; }
.cpt-confirmation p { font-size: .9rem; line-height: 1.8; color: #9A9389; max-width: 44ch; margin: 0 auto; }

/* ── Responsive ── */
@media (max-width: 680px) {
    .cpt-form-grid { grid-template-columns: 1fr; }
    .cpt-field-full { grid-column: 1; }
    .cpt-formule-cards { flex-direction: column; }
    .cpt-form-recipes { grid-template-columns: 1fr; }
    .cpt-recipes-grid { grid-template-columns: 1fr; }
    .cpt-btn-next, .cpt-btn-submit { width: 100%; text-align: center; }
}
