/* ============================================
   STEP5 STYLES - Étape 5 (Zusammenfassung Ihrer Anfrage)
   Tous les styles sont scopés sous #step5 pour que
   l'inspecteur affiche bien step5.css
   ============================================ */

/* Variables step5 (cohérent avec step2/step4) */
#step5 {
    --step5-teal: #01A6C7;
    --step5-teal-dark: #003B66;
    --step5-white: #ffffff;
    --step5-gray-light: #f8f9fc;
    --step5-gray-border: rgba(0, 0, 0, 0.125);
    --step5-text: #212529;
    --step5-text-muted: #6c757d;
}

/* Container principal — taille équilibrée (entre compact et plein écran) */
#step5.step5-container {
    font-size: 0.9375rem;
    max-width: 1140px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

#step5 .step5-summary {
    zoom: 1.03;
}

@supports not (zoom: 1.03) {
    #step5 .step5-summary {
        transform: scale(1.03);
        transform-origin: top center;
    }
}

#step5 .step5-summary-header.mt-4 {
    margin-top: 1rem !important;
}

/* Titre de page */
#step5 .step5-title,
#step5 #step5-title {
    color: #0e204d;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

#step5 .step5-instruction,
#step5 #step5-instruction {
    color: var(--step5-text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    line-height: 1.45;
}

/* Sections summary */
#step5 .step5-summary .step5-section {
    margin-bottom: 0;
}

#step5 .step5-card.mb-4,
#step5 .card.mb-4 {
    margin-bottom: 1rem !important;
}

/* Cartes step5 - header (bleu/teal) */
#step5 .step5-card-header,
#step5 .card.step5-card .card-header,
#step5 .card .card-header {
    background: var(--step5-teal);
    color: var(--step5-white);
    border: none;
    border-bottom: 1px solid var(--step5-gray-border);
    padding: 0.65rem 1.125rem;
    margin-bottom: 0;
    font-weight: 600;
    font-size: 1.0625rem;
    border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}

#step5 .step5-card-title,
#step5 .step5-card-header h5,
#step5 .card .card-header h5 {
    color: var(--step5-white);
    font-weight: 600;
    font-size: 1.0625rem;
    margin-bottom: 0;
    line-height: 1.35;
}

#step5 .step5-card-header .fa,
#step5 .step5-card-header i {
    color: var(--step5-white);
    margin-right: 0.5rem;
}

/* Cartes step5 - body */
#step5 .step5-card-body,
#step5 .card.step5-card .card-body,
#step5 .card .card-body {
    padding: 1rem 1.25rem;
    background: var(--step5-white);
    border: 1px solid var(--step5-gray-border);
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
}

#step5 .step5-card,
#step5 .card.step5-card {
    border: 1px solid var(--step5-gray-border);
    border-radius: 0.25rem;
    background: var(--step5-white);
}

/* Libellés et valeurs dans les cartes */
#step5 .step5-card-body p,
#step5 .step5-card-body .row p,
#step5 .card .card-body p,
#step5 .card .card-body .row p {
    margin-bottom: 0.5rem;
    color: var(--step5-text);
    line-height: 1.45;
    font-size: 0.875rem;
}

#step5 .step5-card-body p:last-child,
#step5 .card .card-body .col-md-6 p:last-child {
    margin-bottom: 0;
}

#step5 .step5-card-body strong,
#step5 .card .card-body strong {
    color: var(--step5-text);
    font-weight: 600;
    font-size: 0.875rem;
}

#step5 .step5-card-body span,
#step5 .card .card-body span {
    font-size: 0.875rem;
}

/* Grille 2 colonnes : champs par paires sur une même ligne (Nom | Adresse, etc.) */
#step5 .step5-pairs-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    align-items: start;
}

#step5 .step5-pair-item {
    margin: 0;
    min-width: 0;
    word-break: break-word;
}

#step5 .step5-pair-item strong {
    display: inline;
    margin-right: 0.25rem;
}

/* Layout classique row/col (autres blocs) */
#step5 .step5-card-body .row,
#step5 .card .card-body .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

#step5 .step5-card-body .row > [class*="col-"],
#step5 .card .card-body .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (min-width: 768px) {
    #step5 .step5-card-body .row > .col-md-6,
    #step5 .card .card-body .row > .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Animation calendrier (utilisée dans step5) */
@keyframes fadeInCalendar {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#step5 .fadeInCalendar {
    animation: fadeInCalendar 0.3s ease-out;
}

/* ----- Alerte Box-Wechsel ----- */
#step5 .step5-alert-box-change {
    border-left: 5px solid #ffc107;
    background: #fff3cd;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}
#step5 .step5-alert-box-change .step5-alert-icon {
    font-size: 1.25rem;
    color: #856404;
}

#step5 .step5-alert-box-change {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}
#step5 .step5-alert-box-change .alert-heading {
    color: #856404;
    font-weight: 600;
}
#step5 .step5-alert-box-change .step5-alert-body {
    color: #856404;
    line-height: 1.6;
}
#step5 .step5-alert-box-change hr {
    border-color: #ffeaa7;
    margin: 15px 0;
}
#step5 .step5-alert-box-change .step5-alert-small {
    color: #856404;
}

/* ----- Adresszusatz row (caché par défaut, affiché par JS) ----- */
#step5 .step5-adresszusatz-row {
    display: none;
}

/* ----- Section Custom Products (cachée par défaut, affichée par JS) ----- */
#step5 .step5-custom-products {
    display: none;
}

/* ----- Signature ----- */
#step5 .step5-signature-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    display: none;
}
#step5 .step5-signature-text-box {
    display: none;
    padding: 20px;
    background: #F5F7FA;
    border: 2px solid #01A6C7;
    border-radius: 8px;
    text-align: center;
}
#step5 .step5-signature-text-inner {
    margin: 0;
    color: #01A6C7;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

/* ----- Bloc consentement (checkbox + label) ----- */
#step5 .step5-consent-block,
#step5 .step5-privacy-block {
    background: #F5F7FA;
    padding: 1rem 1.125rem;
    margin: 1rem 0;
    border: 2px solid #01A6C7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
#step5 .step5-consent-wrap,
#step5 .step5-privacy-wrap {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}
#step5 .step5-consent-checkbox,
#step5 .step5-privacy-checkbox {
    margin-top: 5px;
    transform: scale(1.2);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
#step5 .step5-consent-label,
#step5 .step5-privacy-label {
    font-size: 0.875rem;
    line-height: 1.45;
    color: #333;
    cursor: pointer;
}
#step5 .step5-consent-strong {
    color: #1976d2;
}
#step5 .step5-consent-hinweis {
    font-size: 0.75rem;
    color: #666;
}
#step5 .step5-privacy-label .step5-privacy-link {
    color: #1976d2;
    text-decoration: underline;
    font-weight: 500;
}

/* ----- Bouton Einreichen ----- */
#step5 .step5-btn-submit {
    font-size: 1rem;
    padding: 0.65rem 2rem;
}

#step5 .btn-lg {
    font-size: 1rem;
    padding: 0.6rem 1.5rem;
}

/* Produits / livraison / signature — blocs secondaires */
#step5 .step5-section .table,
#step5 .step5-section table {
    font-size: 0.8125rem;
}

#step5 .step5-signature-text-inner {
    font-size: 0.8125rem;
}

#step5 .step5-signature-text-box {
    padding: 0.75rem 1rem;
}

/* ============================================
   MOBILE ONLY (≤ 768px)
   ============================================ */
   @media (max-width: 767.98px) {

    #step5.step5-container {
        max-width: 100%;
    }

    #step5 .step5-summary {
        zoom: 1;
        transform: none;
        margin-bottom: 0;
    }

    /* Titre principal */
    #step5 .step5-title,
    #step5 #step5-title {
        font-size: 1.25rem;
        text-align: center;
        line-height: 1.2;
    }

    /* Instruction */
    #step5 .step5-instruction {
        text-align: center;
        font-size: 0.9rem;
    }

    #step5 .step5-pairs-grid {
        grid-template-columns: 1fr;
        row-gap: 0.4rem;
    }

    /* Colonnes full width */
    #step5 .step5-card-body .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 12px;
    }

    /* Cartes */
    #step5 .step5-card {
        margin-bottom: 20px;
    }

    /* Header carte */
    #step5 .step5-card-header {
        text-align: center;
        padding: 15px;
        font-size: 16px;
    }

    /* Body carte */
    #step5 .step5-card-body {
        padding: 18px;
    }

    /* Texte */
    #step5 .step5-card-body p {
        font-size: 0.9rem;
    }
}