/**
 * Festin - Formulaire public Click & Collect
 * 
 * Styles spécifiques au formulaire public Click & Collect.
 * Inspiré du design du formulaire de réservation.
 * Note: Ce fichier utilise les variables CSS du thème FESTIN
 */

/* ========================================
   Conteneur principal
   ======================================== */

.festin-cnc-form {
    max-width: 100%;
    min-height: 100vh;
    margin: 0 auto;
}

.festin-cnc-grid-container {
    display: block;
}

.festin-cnc-content {
    min-width: 0;
    /* Permet au contenu de se rétrécir */
}

/* ========================================
   Stepper
   ======================================== */

.festin-cnc-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.festin-cnc-stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.festin-cnc-stepper-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--text-color);
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.festin-cnc-stepper-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
}

.festin-cnc-stepper-circle.active {
    border-color: var(--title-color);
    background: var(--background-color);
}

.festin-cnc-stepper-circle.active .festin-cnc-stepper-dot {
    background: var(--title-color);
}

.festin-cnc-stepper-circle.completed {
    border-color: var(--title-color);
    background: var(--title-color);
}

.festin-cnc-stepper-circle.completed .festin-cnc-stepper-dot {
    background: var(--background-color);
}

.festin-cnc-stepper-label {
    margin-top: 10px;
    font-family: "Dela";
    font-size: 1.4rem;
    color: var(--text-color);
    text-align: center;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.festin-cnc-stepper-item.active .festin-cnc-stepper-label,
.festin-cnc-stepper-item.completed .festin-cnc-stepper-label {
    color: var(--title-color);
    font-weight: 600;
}

.festin-cnc-stepper-item.clickable {
    cursor: pointer;
}

.festin-cnc-stepper-item.clickable:hover .festin-cnc-stepper-circle {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.festin-cnc-stepper-line {
    flex: 1;
    height: 3px;
    background: var(--text-color);
    margin: 0 15px;
    max-width: 150px;
    transition: background 0.3s ease;
}

.festin-cnc-stepper-line.completed {
    background: var(--title-color);
}

/* ========================================
   Étapes du formulaire
   ======================================== */

.festin-cnc-step {
    animation: fadeIn 0.3s ease;
    margin-bottom: 60px;
}

.festin-cnc-step h3 {
    font-family: "Dela";
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 30px 0;
    color: var(--title-color);
}

.festin-cnc-step h4 {
    font-family: "Australian";
    font-size: 4rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--title-color);
}

.step-cart-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ========================================
   Champs de formulaire
   ======================================== */

.festin-cnc-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.festin-cnc-field label {
    font-family: "Australian";
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--title-color);
    font-size: 3rem;
}

.festin-cnc-field input,
.festin-cnc-field select,
.festin-cnc-field textarea {
    color: var(--text-color);
    font-family: "Dela";
    border-radius: 1.8rem;
    font-size: 3rem;
    padding: 1rem 2rem;
    border: solid 3px var(--text-color);
    background: var(--background-color);
    width: 100%;
    box-sizing: border-box;
}

.festin-cnc-field input:focus,
.festin-cnc-field select:focus,
.festin-cnc-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.festin-cnc-field input:disabled,
.festin-cnc-field select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f6f7f7;
}

.festin-cnc-field textarea {
    resize: vertical;
    min-height: 100px;
}

.festin-cnc-field small {
    font-size: 12px;
    color: #646970;
    margin-top: 6px;
    font-style: italic;
}

/* ========================================
   Rangées de champs
   ======================================== */

.festin-cnc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ========================================
   Formulaire client
   ======================================== */

.festin-cnc-client-form {
    margin-bottom: 30px;
}

/* ========================================
   Boutons (style pill custom)
   ======================================== */

.festin-cnc-btn {
    font-family: "Dela";
    position: relative;
    cursor: pointer;
    text-align: center;
    display: flex;
    justify-self: center;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.festin-cnc-btn span {
    position: relative;
    z-index: 1;
    width: 100%;
    font-size: 2rem;
    padding: 1rem 2rem;
    color: var(--text-color);
    border: solid 2px var(--text-color);
    border-radius: var(--radius);
    background: var(--background-color);
    transform: translate(-5px, -5px);
    transition: transform .2s;
}

.festin-cnc-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    border-radius: var(--radius);
}

.festin-cnc-btn:hover span {
    transform: translate(0, -5px);
    border-color: var(--title-color);
}

.festin-cnc-btn:active span {
    transform: translate(0, 0px);
    border-color: var(--title-color);
}

.festin-cnc-btn.cancel span {
    color: white;
    border-color: white;
    --background-color: var(--orange);
}

.festin-cnc-btn.cancel::before {
    background-color: var(--orange);
}

.offwhite-section .festin-cnc-btn {
    --background-color: var(--offwhite);
    --text-color: var(--orange);
}

.festin-cnc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f6f7f7;
}

/* .festin-cnc-btn-primary {
    background: var(--title-color);
    color: var(--background-color);
    border-color: var(--title-color);
}

.festin-cnc-btn-primary::before {
    background: var(--title-color);
}

.festin-cnc-btn-primary:hover:not(:disabled) {
    border-color: var(--title-color);
} */

/* ========================================
   Actions (boutons)
   ======================================== */

.festin-cnc-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* ========================================
   Section produits
   ======================================== */

.festin-cnc-emplacements-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.festin-cnc-emplacement-nav-btn {
    padding: 1rem 2rem;
    font-size: 2rem;
    font-family: "Dela";
    color: var(--text-color);
    border: 0;
}

.festin-cnc-emplacement-nav-btn:hover {
    color: var(--title-color);
}

.festin-cnc-emplacement-nav-btn.active {
    color: var(--title-color);
    border-bottom: solid 2px var(--title-color);
}

.festin-cnc-produits {
    margin: 30px 0;
}

.festin-cnc-loading {
    text-align: center;
    color: #646970;
    font-style: italic;
    padding: 60px 0;
    font-size: 1.6rem;
}

.festin-cnc-emplacement-section {
    padding-top: 5vh;
    margin-bottom: 10vh;
}

.festin-cnc-emplacement-section::after {
    content: "";
    display: block;
    width: 100%;
    max-width: 800px;
    height: 3px;
    background: var(--text-color);
    margin: 5vh auto 0;
}

.festin-cnc-produits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem 10vw;
}

.festin-cnc-produits {}

.festin-cnc-produit {
    display: grid;
    grid-template-columns: 160px 1fr 40px;
    gap: 2rem;
    width: 100%;
}

.festin-cnc-produit-img {
    aspect-ratio: 1/1;
    width: 100%;
}

.festin-cnc-produit-nom {
    font-size: 3rem;
}

/* ========================================
   Boutons de quantité
   ======================================== */

.festin-cnc-produit-qty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.festin-cnc-qty-btn {
    width: 40px;
    height: 40px;
    border: solid 2px var(--text-color);
    border-radius: var(--radius);
    background: var(--background-color);
    color: var(--text-color);
    font-family: "Dela";
    font-size: 2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.festin-cnc-qty-btn:hover:not(:disabled) {
    background: var(--title-color);
    color: var(--background-color);
    border-color: var(--title-color);
}

.festin-cnc-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.festin-cnc-qty-value {
    font-family: "Dela";
    font-size: 2rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    color: var(--text-color);
}

/* ========================================
   Section Panier (Step 3)
   ======================================== */

.festin-cnc-cart-section {
    margin-bottom: 40px;
    padding: 3rem;
    border-radius: var(--images-radius);
    background: var(--background-color);
    border: solid 2px var(--text-color);
}

.festin-cnc-cart-section h4 {
    font-family: "Dela";
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 30px 0;
    color: var(--title-color);
    text-align: center;
}

.festin-cnc-cart-date-time {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: solid 2px var(--text-color);
}

.festin-cnc-cart-date,
.festin-cnc-cart-heure {
    font-family: "Dela";
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.festin-cnc-cart-date strong,
.festin-cnc-cart-heure strong {
    color: var(--title-color);
    font-weight: 600;
}

.festin-cnc-cart-list {
    margin-bottom: 25px;
    min-height: 100px;
}

.festin-cnc-cart-list .festin-cnc-recap-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: solid 1px var(--text-color);
    font-family: "Dela";
    font-size: 1.8rem;
}

.festin-cnc-cart-list .festin-cnc-recap-item:last-child {
    border-bottom: none;
}

.festin-cnc-empty-cart {
    text-align: center;
    font-family: "Dela";
    font-size: 1.6rem;
    color: var(--text-color);
    font-style: italic;
    padding: 40px 0;
}

.festin-cnc-cart-total {
    font-family: "Dela";
    font-size: 2.5rem;
    text-align: right;
    padding-top: 20px;
    border-top: solid 2px var(--text-color);
    color: var(--title-color);
}

.festin-cnc-cart-total strong {
    font-weight: 600;
}

/* ========================================
   Récapitulatif final
   ======================================== */

.festin-cnc-final-recap {
    margin: 30px 0;
    padding: 4rem;
    border-radius: var(--images-radius);
    background: var(--background-color);
    border: solid 3px var(--title-color);
    animation: fadeIn 0.3s ease;
}

.festin-cnc-final-recap h4 {
    text-align: center;
    margin-bottom: 30px;
}

.festin-cnc-recap-detail {
    font-family: "Dela";
    font-size: 1.8rem;
    line-height: 1.8;
}

.festin-cnc-recap-detail>div {
    margin-bottom: 15px;
}

.festin-cnc-recap-detail strong {
    font-weight: 600;
    color: var(--title-color);
}

.festin-cnc-final-produits {
    margin: 15px 0;
    padding-left: 20px;
}

.festin-cnc-final-total {
    font-size: 2.5rem;
    text-align: right;
    padding-top: 20px;
    margin-top: 20px;
    border-top: solid 2px var(--text-color);
    color: var(--title-color);
}

.festin-cnc-final-total strong {
    font-weight: 600;
}

/* ========================================
   Messages d'erreur
   ======================================== */

.festin-cnc-error {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

.festin-cnc-error p {
    margin: 0;
    font-size: 1.4rem;
}

/* ========================================
   Message d'information
   ======================================== */

.festin-cnc-info {
    text-align: center;
    margin-top: 20px;
    color: #646970;
    font-size: 1.2rem;
}

.festin-cnc-info small {
    font-style: italic;
}

/* ========================================
   Confirmation / Succès
   ======================================== */

.festin-cnc-confirmation {
    text-align: center;
    padding: 4rem;
}

.festin-cnc-success {
    animation: fadeIn 0.5s ease;
}

.festin-cnc-success h3 {
    color: #00a32a;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.festin-cnc-success p {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.6;
}

.festin-cnc-success p:last-child {
    margin-bottom: 0;
}

.festin-cnc-success strong {
    color: var(--title-color);
    font-weight: 600;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Grille de créneaux (même style que réservation)
   ======================================== */

.festin-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* ========================================
   Bouton de slot (style pill custom)
   ======================================== */

.festin-slot-btn {
    position: relative;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.festin-slot-btn span {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 1rem 2rem;
    border: solid 2px var(--text-color);
    border-radius: var(--radius);
    background: var(--background-color);
    transform: translate(-5px, -5px);
    transition: transform .2s;
}

.festin-slot-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    border-radius: var(--radius);
}

.festin-slot-btn:hover:not(.disabled) span {
    transform: translate(0, -5px);
    border-color: var(--title-color);
}

.festin-slot-btn:active:not(.disabled) span {
    transform: translate(0, 0);
    border-color: var(--title-color);
}

.festin-slot-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f6f7f7;
}

.festin-slot-btn.low-capacity {
    --text-color: orange;
    color: var(--text-color);
}

.festin-slot-btn.low-capacity::after {
    content: "Bientôt complet !";
    position: absolute;
    color: white;
    background: orange;
    border-radius: 0 0 3px 3px;
    font-size: 1rem;
    padding: 1px 0.8rem;
    left: 50%;
    bottom: 0;
    text-align: center;
    transform: translate(-50%, 60%);
}

.festin-slot-time {
    font-size: 18px;
    font-weight: 600;
    display: block;
}

.festin-slot-btn.selected span {
    background: var(--title-color);
    color: var(--background-color);
    border-color: var(--title-color);
}

.festin-no-slots {
    text-align: center;
    color: #646970;
    font-style: italic;
    padding: 60px 0;
    font-size: 1.6rem;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1000px) {
    .step-cart-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .festin-cnc-row {
        grid-template-columns: 1fr;
    }

    .festin-cnc-actions {
        flex-direction: column-reverse;
    }

    .festin-cnc-btn {
        width: 100%;
    }

    .festin-cnc-cart-section {
        padding: 2rem;
    }

    .festin-cnc-produits-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .festin-cnc-stepper {
        margin-bottom: 30px;
        padding: 15px 0;
    }

    .festin-cnc-stepper-circle {
        width: 35px;
        height: 35px;
    }

    .festin-cnc-stepper-dot {
        width: 10px;
        height: 10px;
    }

    .festin-cnc-stepper-label {
        font-size: 1.2rem;
        margin-top: 8px;
    }

    .festin-cnc-stepper-line {
        max-width: 80px;
        margin: 0 10px;
    }

    .festin-cnc-step h3 {
        font-size: 2rem;
    }

    /* .festin-cnc-step h4 {
        font-size: 1.8rem;
    } */

    .festin-cnc-field label {
        font-size: 1.6rem;
    }

    .festin-cnc-field input,
    .festin-cnc-field select,
    .festin-cnc-field textarea {
        font-size: 2rem;
        padding: 0.8rem 1.5rem;
    }

    .festin-cnc-btn {
        font-size: 1.6rem;
        padding: 0.8rem 1.5rem;
    }

    .festin-cnc-final-recap {
        padding: 2rem;
    }

    .festin-cnc-recap {
        padding: 1.5rem;
    }

    .festin-cnc-confirmation {
        padding: 2rem;
    }

    .festin-cnc-success h3 {
        font-size: 2rem;
    }

    .festin-cnc-success p {
        font-size: 1.4rem;
    }

    .festin-cnc-produits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .festin-cnc-step h3 {
        font-size: 1.8rem;
    }

    .festin-cnc-field input,
    .festin-cnc-field select,
    .festin-cnc-field textarea {
        font-size: 1.6rem;
    }

    .festin-cnc-btn {
        font-size: 1.4rem;
    }
}