/* =====================================================
   CourrierEnLigne.fr — Styles spécifiques panier/checkout
   ===================================================== */

/* ===================== PAGE TARIFS ===================== */
.tarif-simulator {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 700px;
    margin: 2rem auto 0;
}

/* ===================== CART ===================== */
.cart-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
@media (max-width: 900px) { .cart-grid { grid-template-columns: 1fr; } }

.cart-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.cart-item-icon {
    width: 56px; height: 72px;
    background: var(--bleu-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    color: var(--bleu);
    flex-shrink: 0;
}
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-title { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.cart-item-tags { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin-top: 0.3rem; }
.cart-item-meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.cart-item-meta strong { color: var(--text); }
.cart-item-price {
    font-size: 1.3rem; font-weight: 800; color: var(--bleu);
    letter-spacing: -0.02em;
}
.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 110px;
}
.cart-item-edit,
.cart-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}
.cart-item-edit {
    background: var(--bleu-pale, #EFF6FB);
    color: var(--bleu);
    border: 1px solid transparent;
}
.cart-item-edit:hover {
    background: var(--bleu);
    color: #fff;
    transform: translateY(-1px);
}
.cart-item-remove {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    min-width: auto;
    min-height: auto;
}
.cart-item-remove:hover {
    color: var(--danger, #DC2626);
    border-color: var(--danger, #DC2626);
}

/* ====================================================================
   PANIER MOBILE (≤ 600px)
   ==================================================================== */
@media (max-width: 600px) {
    .cart-item {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.75rem;
        position: relative;
    }
    .cart-item-icon { width: 44px; height: 56px; }
    .cart-item-body { width: calc(100% - 60px); }
    .cart-item-title { font-size: 0.95rem; line-height: 1.3; }
    .cart-item-tags { gap: 0.25rem; }
    .cart-item-meta { font-size: 0.78rem; }
    .cart-item-price {
        font-size: 1.15rem;
        margin-left: auto;
        order: 3;
    }
    .cart-item-actions {
        flex-direction: row;
        width: 100%;
        order: 4;
        min-width: auto;
    }
    .cart-item-edit { flex: 1; }
    .cart-item-remove {
        flex-shrink: 0;
        width: 40px;
        padding: 0.5rem;
    }
    .cart-item-remove svg + span { display: none; }
    .cart-item-thumb { width: 80px !important; height: 100px !important; }
    .cart-add-more { padding: 0.85rem; font-size: 0.9rem; }
}

.cart-add-more {
    background: transparent;
    border: 1.5px dashed var(--bleu);
    border-radius: var(--radius-lg);
    padding: 1rem;
    font-weight: 600;
    color: var(--bleu);
    cursor: pointer;
    width: 100%;
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    text-decoration: none;
}
.cart-add-more:hover { background: var(--bleu-pale); }

.cart-empty {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 2rem;
}
.cart-empty .icon { color: var(--muted); margin-bottom: 1rem; }
.cart-empty h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; }
.cart-empty p { color: var(--muted); margin-bottom: 1.5rem; }

/* ===================== CHECKOUT ===================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.checkout-section h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 1rem; }
.card-brands { display: flex; gap: 0.4rem; }
.card-brand {
    padding: 0.3rem 0.5rem;
    background: var(--bleu-light);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--bleu);
}

/* ===================== CONFIRMATION ===================== */
.confirmation-wrap {
    background: var(--bg-soft);
    min-height: calc(100vh - 130px);
    padding: 3rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirmation-card {
    max-width: 580px;
    width: 100%;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}
.confirmation-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 6px;
    background: var(--jaune);
}
.confirmation-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: #DCFCE7;
    color: var(--success);
    display: inline-flex;
    align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.confirmation-card h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
}
.confirmation-card .ref { font-family: var(--font-mono); color: var(--bleu); font-weight: 700; }
.next-steps {
    background: var(--bleu-pale);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-top: 1.5rem;
    text-align: left;
}
.next-steps .title {
    font-size: 0.78rem; font-weight: 700;
    color: var(--bleu); letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.next-step { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; font-size: 0.9rem; color: var(--text); }
.next-step svg { color: var(--success); flex-shrink: 0; }

/* =====================================================
   PRICING SPRINT 2.5 — Nouvelles classes
   ===================================================== */

/* Type grid 2 colonnes (au lieu de 4) */
.type-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.type-grid-2 .type-card {
    padding: 1.5rem;
    min-height: 200px;
}
.type-grid-2 .type-card h3 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}
.type-grid-2 .type-card .price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bleu);
    margin-top: 0.25rem;
}

/* Option sections (groupes d'options à l'étape 4) */
.option-section {
    margin-bottom: 1.5rem;
}
.option-section.hidden {
    display: none;
}
.option-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 0 0 0.75rem 0;
}

/* Radios délai (look comme options-card) */
.option-radio-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
.option-radio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
}
.option-radio:hover {
    border-color: var(--bleu);
    background: var(--bleu-pale);
}
.option-radio.hidden { display: none; }
.option-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--bleu);
}
.option-radio input[type="radio"]:checked + .option-radio-content .title { color: var(--bleu); }
.option-radio:has(input:checked) {
    border-color: var(--bleu);
    background: var(--bleu-pale);
}
.option-radio-content .title {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.option-radio-content .desc {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

/* Badge spéciaux pour les délais */
.badge-orange {
    background: #FFEDD5;
    color: #C2410C;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
}
.badge-green {
    background: #DCFCE7;
    color: #166534;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
}

/* Option card désactivée (suivi quand délai non-J+3) */
.option-card.disabled {
    opacity: 0.4;
    pointer-events: none;
    background: var(--bg-soft);
}

/* Récap dans aside : badge "0% TVA" + sub */
.recap-row .vat-zero {
    display: inline-block;
    font-size: 0.62rem;
    background: #DBEAFE;
    color: #1E40AF;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.4rem;
    font-weight: 600;
}
.recap-row .label .sub {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
    font-weight: 400;
}

/* Décomposition dépliable dans le panier */
.cart-item-breakdown {
    margin-top: 0.75rem;
    border-top: 1px dashed var(--border);
    padding-top: 0.5rem;
}
.cart-item-breakdown summary {
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--bleu);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0;
    user-select: none;
}
.cart-item-breakdown summary::-webkit-details-marker { display: none; }
.cart-item-breakdown summary svg {
    transition: transform 0.2s ease;
}
.cart-item-breakdown[open] summary svg {
    transform: rotate(90deg);
}
.cart-item-breakdown summary:hover {
    color: var(--primary);
}
.breakdown-lines {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-soft);
    border-radius: var(--radius);
    font-size: 0.85rem;
}
.breakdown-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.3rem 0;
    gap: 1rem;
}
.breakdown-line + .breakdown-line {
    border-top: 1px solid var(--border);
}
.breakdown-label {
    color: var(--text);
    line-height: 1.4;
}
.breakdown-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
}
.breakdown-value {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.breakdown-vat {
    display: inline-block;
    font-size: 0.62rem;
    background: #DBEAFE;
    color: #1E40AF;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.4rem;
    font-weight: 600;
    vertical-align: middle;
}
.breakdown-total {
    border-top: 2px solid var(--border) !important;
    margin-top: 0.5rem;
    padding-top: 0.6rem !important;
    font-weight: 700;
    font-size: 0.95rem;
}
.breakdown-total .breakdown-label,
.breakdown-total .breakdown-value {
    font-weight: 700;
    color: var(--text);
}
.breakdown-tva {
    font-size: 0.78rem;
    color: var(--muted);
}
.breakdown-tva .breakdown-value {
    font-weight: 500;
    color: var(--muted);
}

/* Confirmation : décomposition de la facture */
.order-breakdown summary {
    list-style: none;
}
.order-breakdown summary::-webkit-details-marker { display: none; }
.order-breakdown summary::before {
    content: "▸ ";
    margin-right: 0.25rem;
    transition: transform 0.2s ease;
    display: inline-block;
}
.order-breakdown[open] summary::before {
    transform: rotate(90deg);
}

/* Recap aside : style "small" sur petit texte */
.recap-row .label small {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 400;
}

/* =====================================================
   PRODUCT GRID 2 COLONNES (index + tarifs)
   ===================================================== */
.product-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 800px;
    margin: 0 auto;
    gap: 1.5rem;
}

/* =====================================================
   PAGE TARIFS — tables et cards
   ===================================================== */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.pricing-table thead tr {
    background: var(--bleu-pale);
    color: var(--bleu);
}
.pricing-table th,
.pricing-table td {
    padding: 0.85rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.pricing-table th {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.pricing-table tbody tr:last-child td {
    border-bottom: none;
}
.pricing-table tbody tr:hover {
    background: var(--bg-soft);
}
.pricing-table td small {
    color: var(--muted);
    font-size: 0.72rem;
}

.info-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.info-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bleu);
    margin: 0 0 0.5rem 0;
}
.info-card p {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.info-card p.small {
    font-size: 0.78rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
    color: var(--muted);
}
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}
.info-table th,
.info-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.info-table th {
    background: var(--bg-soft);
    font-weight: 700;
    color: var(--text);
    font-size: 0.78rem;
}
.info-table tr:last-child td { border-bottom: none; }

/* =====================================================
   OPTION-RADIO : clic sur toute la case (priorité)
   ===================================================== */
.option-radio {
    /* Le label entier doit être cliquable */
    cursor: pointer;
    position: relative;
}
.option-radio,
.option-radio * {
    /* S'assurer qu'aucun enfant ne bloque le clic */
    user-select: none;
}
/* Cacher visuellement le radio sans le rendre inaccessible */
.option-radio input[type="radio"] {
    /* On garde un radio cliquable + visible */
    flex-shrink: 0;
    margin: 0;
}
/* Quand checked, on applique le style sélectionné via classe JS (pas :has) */
.option-radio.selected {
    border-color: var(--bleu);
    background: var(--bleu-pale);
    box-shadow: 0 0 0 1px var(--bleu) inset;
}
.option-radio.selected .option-radio-content .title {
    color: var(--bleu);
}
.option-radio-content {
    flex: 1;
    /* le contenu ne doit pas intercepter le clic destiné au label */
    pointer-events: none;
}

/* =====================================================
   RECAP SIDEBAR — fix alignement valeur + badge 0% TVA
   ===================================================== */
.recap-row {
    display: flex;
    align-items: flex-start;        /* haut, pour gérer les sub-texts longs */
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.recap-row .label {
    flex: 1;
    min-width: 0;                   /* important pour le wrap */
    font-size: 0.9rem;
}
.recap-row .label .sub {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
    font-weight: 400;
    line-height: 1.4;
}
.recap-row .value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
}
.recap-row .value .amount {
    font-weight: 700;
    color: var(--text);
}
/* Override de la règle précédente : pas de margin-left, c'est en colonne */
.recap-row .value .vat-zero {
    margin-top: 0.25rem;
    margin-left: 0;
}

/* =====================================================
   PANIER — décomposition : badge "0% TVA" en dessous du prix
   ===================================================== */
.breakdown-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    white-space: nowrap;
    color: var(--text);
}
.breakdown-value .breakdown-amount {
    font-weight: 600;
}
.breakdown-total .breakdown-value .breakdown-amount {
    font-weight: 700;
    font-size: 0.95rem;
}
.breakdown-tva .breakdown-value .breakdown-amount {
    font-weight: 500;
    color: var(--muted);
}
/* Override : pas de margin-left, c'est en colonne maintenant */
.breakdown-value .breakdown-vat {
    margin-top: 0.25rem;
    margin-left: 0;
}

/* =====================================================
   SIDEBAR RÉCAP — refonte graphique (override app.css)
   ===================================================== */

/* Carte : bordure subtile + ombre douce */
.recap-card {
    border: 1px solid #E5E9F2;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(15, 30, 60, 0.05);
    overflow: hidden;
}

/* Header — couleur charte (bleu marque), pas de gradient */
.recap-header {
    background: var(--bleu);
    padding: 1.1rem 1.4rem;
}
.recap-header .label {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    font-weight: 700;
    opacity: 0.7;
    text-transform: uppercase;
}
.recap-header .title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.35rem;
    letter-spacing: -0.005em;
}

/* Sur mobile : header sidebar en gris pour ne pas concurrencer le CTA bleu */
@media (max-width: 768px) {
    .recap-header {
        background: #475569 !important;  /* gris ardoise terne */
    }
    .recap-header .label,
    .recap-header .title,
    .recap-header .subtitle {
        color: #fff;
    }
}

/* Body avec espacement plus aéré */
.recap-body {
    padding: 0.5rem 1.4rem 1.25rem;
}

/* Lignes de détail : pas de bordure (ni top ni bottom), juste un padding aéré */
.recap-row {
    padding: 0.55rem 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
}
.recap-row:last-of-type {
    border-bottom: none;
}

/* Bloc TOTAL : zone grise distinctive, pas de bordure (le fond gris suffit) */
.recap-total {
    border-top: 0 !important;
    margin: 0.75rem -1.4rem 0 !important;          /* déborde sur les côtés */
    padding: 1.1rem 1.4rem 0.9rem !important;
    background: #F8FAFC;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.recap-total .label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}
.recap-total .value {
    font-size: 1.55rem !important;       /* moins gros, plus élégant */
    font-weight: 800;
    color: var(--bleu) !important;
    letter-spacing: -0.02em;
}

/* Sous-texte TVA : prolonge le bloc Total sans séparateur */
.recap-tva {
    font-size: 0.72rem !important;
    color: var(--muted) !important;
    font-family: inherit !important;     /* override le mono */
    background: #F8FAFC;
    margin: 0 -1.4rem -1.25rem !important;
    padding: 0 1.4rem 0.9rem !important;
    text-align: right;
    line-height: 1.5;
}

/* =====================================================
   GOOGLE PLACES — style de la dropdown autocomplete
   ===================================================== */
.pac-container {
    border-radius: 8px;
    border: 1px solid #E5E9F2;
    box-shadow: 0 10px 25px rgba(15, 30, 60, 0.12);
    margin-top: 4px;
    padding: 4px 0;
    font-family: inherit;
    z-index: 99999;
}
.pac-item {
    padding: 8px 12px;
    font-size: 0.92rem;
    cursor: pointer;
    border-top: none;
    line-height: 1.4;
}
.pac-item:hover,
.pac-item-selected {
    background: #F8FAFC;
}
.pac-icon {
    margin-right: 8px;
}
.pac-item-query {
    font-size: 0.95rem;
    color: var(--ink);
    font-weight: 600;
}
.pac-matched {
    font-weight: 700;
    color: var(--bleu);
}

/* =====================================================
   HEADER — Animations hover (logo, connexion, panier)
   ===================================================== */

/* Logo : pas de soulignement, animation enveloppe au hover */
.cel-logo,
.cel-logo:hover,
.cel-logo:focus,
.cel-logo:active {
    text-decoration: none !important;
}
.cel-logo .cel-logo-mark {
    transition: box-shadow 0.3s ease,
                background 0.3s ease;
    overflow: hidden;
}
.cel-logo:hover .cel-logo-mark {
    box-shadow: 0 6px 16px rgba(0, 96, 174, 0.3);
}
.cel-logo .cel-logo-mark svg {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cel-logo:hover .cel-logo-mark svg {
    transform: scale(1.2) rotate(-6deg);
}
.cel-logo .cel-logo-text strong,
.cel-logo .cel-logo-text small {
    transition: color 0.2s ease;
}
.cel-logo:hover .cel-logo-text strong {
    color: var(--bleu-dark, #004A85);
}

/* Bouton connexion : pas de soulignement, animation icône + bord */
.cel-btn-login,
.cel-btn-login:hover,
.cel-btn-login:focus {
    text-decoration: none !important;
}
.cel-btn-login {
    transition: border-color 0.2s ease,
                background 0.2s ease,
                color 0.2s ease,
                transform 0.15s ease;
}
.cel-btn-login:hover {
    border-color: var(--bleu);
    background: var(--bleu-pale, #F4F9FD);
    color: var(--bleu);
    transform: translateY(-1px);
}
.cel-btn-login svg {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cel-btn-login:hover svg:first-child {
    transform: scale(1.15);
}

/* Bouton panier : pas de soulignement, animation rebond + ombre */
.cel-btn-cart,
.cel-btn-cart:hover,
.cel-btn-cart:focus {
    text-decoration: none !important;
}
.cel-btn-cart {
    transition: background 0.2s ease,
                transform 0.15s ease,
                box-shadow 0.25s ease;
}
.cel-btn-cart:hover {
    background: var(--bleu-dark, #004A85);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 96, 174, 0.35);
}
.cel-btn-cart svg {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cel-btn-cart:hover svg {
    transform: scale(1.12);
}
.cel-btn-cart .badge {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cel-btn-cart:hover .badge {
    transform: scale(1.2);
}

/* Animation de pulse sur le badge panier quand un article y est ajouté
   (à déclencher en ajoutant la classe .pulse via JS) */
@keyframes cart-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}
.cel-btn-cart .badge.pulse {
    animation: cart-pulse 0.5s ease;
}

/* =====================================================
   PAGES LÉGALES (mentions, CGV, RGPD)
   ===================================================== */

.container-narrow {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.legal-page h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--ink, #0F1E3C);
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.legal-lead {
    font-size: 1.05rem;
    color: var(--muted, #6B7280);
    margin: 0 0 2.5rem;
}

.legal-page h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--bleu, #0060AE);
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.01em;
}

.legal-page h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink, #0F1E3C);
    margin: 1.5rem 0 0.6rem;
}

.legal-page p {
    line-height: 1.7;
    color: var(--ink, #0F1E3C);
    margin: 0 0 1rem;
    font-size: 0.96rem;
}

.legal-page ul {
    padding-left: 1.25rem;
    margin: 0 0 1.25rem;
}

.legal-page ul li {
    line-height: 1.7;
    margin-bottom: 0.5rem;
    color: var(--ink, #0F1E3C);
    font-size: 0.96rem;
}

.legal-page a {
    color: var(--bleu, #0060AE);
    text-decoration: underline;
    font-weight: 600;
}

.legal-page a:hover {
    color: var(--bleu-dark, #004A85);
}

.legal-box {
    background: #F8FAFC;
    border-left: 3px solid var(--bleu, #0060AE);
    border-radius: 8px;
    padding: 1.1rem 1.4rem;
    margin: 1.5rem 0;
}

.legal-box p:last-child {
    margin-bottom: 0;
}

.legal-callout {
    background: #FFF7ED;
    border-left: 3px solid #F97316;
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    margin: 1.5rem 0;
    font-size: 0.94rem;
    line-height: 1.6;
}

.legal-phone {
    display: inline-block;
    margin-top: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bleu, #0060AE);
    letter-spacing: 0.04em;
}

.legal-at {
    color: var(--muted, #6B7280);
    font-style: italic;
}

.legal-updated {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid #E5E9F2;
    color: var(--muted, #6B7280);
    font-size: 0.85rem;
    font-style: italic;
}

/* =====================================================
   PAGE CONTACT
   ===================================================== */

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}
.contact-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--ink, #0F1E3C);
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}
.contact-lead {
    font-size: 1.05rem;
    color: var(--muted, #6B7280);
    margin: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 850px) {
    .contact-grid { grid-template-columns: 1fr; }
}

.contact-form-card {
    background: #fff;
    border: 1px solid #E5E9F2;
    border-radius: 12px;
    padding: 2rem;
}
.contact-form-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink, #0F1E3C);
    margin: 0 0 1.5rem;
}

.contact-field {
    margin-bottom: 1.2rem;
}
.contact-field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink, #0F1E3C);
    margin-bottom: 0.4rem;
}
.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #E5E9F2;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink, #0F1E3C);
    transition: border-color 0.15s ease;
}
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: var(--bleu, #0060AE);
}
.contact-field textarea {
    resize: vertical;
    min-height: 140px;
}
.contact-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--muted, #6B7280);
    margin-top: 0.3rem;
}

.contact-alert {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    line-height: 1.5;
}
.contact-alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.contact-alert-danger  { background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-info-card {
    background: #fff;
    border: 1px solid #E5E9F2;
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
}
.contact-info-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.7rem;
    color: var(--ink, #0F1E3C);
}
.contact-info-card p {
    margin: 0 0 0.5rem;
    font-size: 0.93rem;
    color: var(--ink, #0F1E3C);
    line-height: 1.5;
}
.contact-info-card p:last-child {
    margin-bottom: 0;
}
.contact-info-note {
    font-size: 0.82rem;
    color: var(--muted, #6B7280);
    line-height: 1.45;
}

.contact-info-highlight {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: #BFDBFE;
}
.contact-info-highlight h3 { color: var(--bleu, #0060AE); }
.contact-info-highlight .btn {
    margin-top: 0.8rem;
}

.contact-phone-block {
    text-align: center;
    margin: 0.4rem 0 0.8rem !important;
}
.contact-phone {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bleu, #0060AE);
    text-decoration: none;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.6rem;
}
.contact-phone:hover {
    color: var(--bleu-dark, #004A85);
    text-decoration: underline;
}

.btn.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

/* =====================================================
   PAGE FAQ
   ===================================================== */

.faq-section {
    background: linear-gradient(180deg, #F8FAFC 0%, #fff 100%);
    padding: 3rem 0 5rem;
}

.faq-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.faq-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.faq-badge {
    display: inline-block;
    background: var(--bleu, #0060AE);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}
.faq-header h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--ink, #0F1E3C);
    letter-spacing: -0.025em;
    margin: 0 0 0.7rem;
}
.faq-lead {
    font-size: 1.1rem;
    color: var(--muted, #6B7280);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Search */
.faq-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1.5px solid #E5E9F2;
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    max-width: 540px;
    margin: 0 auto 2.5rem;
    box-shadow: 0 4px 12px rgba(15, 30, 60, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq-search-bar:focus-within {
    border-color: var(--bleu, #0060AE);
    box-shadow: 0 4px 16px rgba(0, 96, 174, 0.12);
}
.faq-search-bar svg {
    color: var(--muted, #6B7280);
    flex-shrink: 0;
}
.faq-search-bar input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 0.96rem;
    font-family: inherit;
    color: var(--ink, #0F1E3C);
}
.faq-search-bar input::placeholder { color: var(--muted, #6B7280); }
#faq-search-clear {
    background: #F1F5F9;
    border: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--muted, #6B7280);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
#faq-search-clear:hover { background: #E5E9F2; color: var(--ink, #0F1E3C); }

.faq-no-results {
    text-align: center;
    color: var(--muted, #6B7280);
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

/* Groupes thématiques */
.faq-group {
    margin-bottom: 2.5rem;
}
.faq-group-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--bleu, #0060AE);
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
}
.faq-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-radius: 10px;
    font-size: 1.05rem;
}

/* Liste questions */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.faq-item {
    background: #fff;
    border: 1.5px solid #E5E9F2;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover {
    border-color: #BFDBFE;
}
.faq-item.is-open {
    border-color: var(--bleu, #0060AE);
    box-shadow: 0 4px 16px rgba(0, 96, 174, 0.08);
}

/* Bouton question */
.faq-question {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--ink, #0F1E3C);
    transition: background 0.15s ease;
}
.faq-question:hover {
    background: #F8FAFC;
}
.faq-question-text {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    flex: 1;
}
.faq-question-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F1F5F9;
    color: var(--bleu, #0060AE);
    flex-shrink: 0;
    transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}
.faq-item.is-open .faq-question-icon {
    transform: rotate(180deg);
    background: var(--bleu, #0060AE);
    color: #fff;
}

/* Réponse (accordéon) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.faq-answer-inner {
    padding: 0 1.25rem 1.25rem;
    color: var(--ink, #0F1E3C);
    line-height: 1.65;
    font-size: 0.96rem;
}
.faq-answer-inner p {
    margin: 0 0 0.85rem;
}
.faq-answer-inner p:last-child { margin-bottom: 0; }

.faq-answer-inner ul,
.faq-answer-inner ol {
    padding-left: 1.25rem;
    margin: 0 0 1rem;
}
.faq-answer-inner ul li,
.faq-answer-inner ol li {
    margin-bottom: 0.45rem;
    line-height: 1.6;
}
.faq-answer-inner ul li:last-child,
.faq-answer-inner ol li:last-child { margin-bottom: 0; }
.faq-answer-inner ul ul {
    margin-top: 0.45rem;
    margin-bottom: 0;
}

.faq-answer-inner a {
    color: var(--bleu, #0060AE);
    text-decoration: underline;
    font-weight: 600;
}
.faq-answer-inner a:hover {
    color: var(--bleu-dark, #004A85);
}

.faq-steps {
    counter-reset: faq-step;
    list-style: none;
    padding-left: 0;
}
.faq-steps > li {
    counter-increment: faq-step;
    position: relative;
    padding-left: 2.3rem;
    margin-bottom: 1rem;
}
.faq-steps > li::before {
    content: counter(faq-step);
    position: absolute;
    left: 0;
    top: -2px;
    width: 26px;
    height: 26px;
    background: var(--bleu, #0060AE);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
}
.faq-steps > li ul {
    margin-top: 0.4rem;
    margin-bottom: 0;
    padding-left: 1rem;
}

.faq-callout {
    background: #F4F9FD;
    border-left: 3px solid var(--bleu, #0060AE);
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin: 0.7rem 0;
    font-size: 0.93rem;
    line-height: 1.6;
}
.faq-callout strong:first-child {
    display: block;
    color: var(--bleu, #0060AE);
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}
.faq-callout ul {
    margin-top: 0.45rem;
    margin-bottom: 0;
}

/* CTA bas */
.faq-cta {
    margin-top: 3.5rem;
    background: linear-gradient(135deg, #0060AE 0%, #004A85 100%);
    color: #fff;
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 96, 174, 0.15);
}
.faq-cta h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: #fff;
}
.faq-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1.5rem;
    font-size: 1rem;
}
.faq-cta-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}
.faq-cta-buttons .btn-primary {
    background: var(--jaune, #FFE413);
    color: var(--ink, #0F1E3C);
    border-color: var(--jaune, #FFE413);
}
.faq-cta-buttons .btn-primary:hover {
    background: #FFD700;
    border-color: #FFD700;
}
.faq-cta-buttons .btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
.faq-cta-buttons .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@media (max-width: 600px) {
    .faq-question { padding: 0.95rem 1rem; }
    .faq-question-text { font-size: 0.94rem; }
    .faq-answer-inner { padding: 0 1rem 1rem; }
    .faq-group-title { font-size: 1.15rem; }
}

/* =====================================================
   UPLOAD MULTI-PDF + MERGE
   ===================================================== */

.upload-files-list {
    margin-top: 1rem;
    background: #fff;
    border: 1.5px solid #E5E9F2;
    border-radius: 12px;
    overflow: hidden;
}

.upload-files-list-header {
    padding: 0.85rem 1.1rem;
    background: #F8FAFC;
    border-bottom: 1px solid #E5E9F2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
}
.upload-files-list-header strong {
    color: var(--ink, #0F1E3C);
    font-weight: 700;
}
.upload-files-summary {
    font-size: 0.82rem;
    color: var(--muted, #6B7280);
    font-variant-numeric: tabular-nums;
}

.upload-files {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upload-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.1rem;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.15s ease;
}
.upload-file-item:last-child { border-bottom: 0; }
.upload-file-item:hover { background: #FAFBFC; }

.upload-file-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--bleu, #0060AE);
    color: #fff;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
}

.upload-file-info {
    flex: 1;
    min-width: 0;
}
.upload-file-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink, #0F1E3C);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.upload-file-meta {
    font-size: 0.78rem;
    color: var(--muted, #6B7280);
    margin-top: 1px;
}

.upload-file-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.upload-file-btn {
    background: transparent;
    border: 1px solid #E5E9F2;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted, #6B7280);
    transition: all 0.15s ease;
}
.upload-file-btn:hover:not(:disabled) {
    background: #EFF6FF;
    color: var(--bleu, #0060AE);
    border-color: var(--bleu, #0060AE);
}
.upload-file-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.upload-file-btn-danger:hover:not(:disabled) {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FCA5A5;
}

.upload-files-hint {
    padding: 0.75rem 1.1rem;
    background: #F8FAFC;
    border-top: 1px solid #E5E9F2;
    font-size: 0.82rem;
    color: var(--muted, #6B7280);
    line-height: 1.45;
}

.upload-progress {
    margin-top: 1.2rem;
    padding: 1.5rem;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}
/* Garantit que .hidden masque même si l'élément a un display:flex */
.upload-progress.hidden,
.upload-files-list.hidden {
    display: none !important;
}
.upload-progress-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #BFDBFE;
    border-top-color: var(--bleu, #0060AE);
    border-radius: 50%;
    animation: upload-spin 0.7s linear infinite;
}
@keyframes upload-spin {
    to { transform: rotate(360deg); }
}
.upload-progress-text {
    color: var(--bleu, #0060AE);
    font-weight: 600;
}

.dropzone.uploading {
    opacity: 0.5;
    pointer-events: none;
}

.file-meta-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 3px 10px;
    background: var(--jaune, #FFE413);
    color: var(--ink, #0F1E3C);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

@media (max-width: 600px) {
    .upload-file-item { gap: 0.5rem; padding: 0.6rem 0.85rem; }
    .upload-files-hint { padding: 0.6rem 0.85rem; font-size: 0.78rem; }
    .upload-file-name { font-size: 0.85rem; }
}

/* =====================================================
   OPTION RECTO-VERSO FORCÉE (>60 pages)
   ===================================================== */

.option-card.locked {
    position: relative;
    cursor: not-allowed;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: var(--bleu, #0060AE);
}
.option-card.locked input[type="checkbox"] {
    pointer-events: none;
}
.option-card.locked::after {
    content: "Obligatoire";
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bleu, #0060AE);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.info-banner-warning {
    background: #FFF7ED !important;
    border-color: #FED7AA !important;
    color: #9A3412 !important;
}
.info-banner-warning svg {
    color: #F97316 !important;
}

/* =====================================================
   PANIER : APERÇU PDF
   ===================================================== */

/* ----- Miniature à gauche de l'item ----- */

.cart-item-thumb {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 160px;
    padding: 0;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    border: 1px solid #E5E9F2;
    border-radius: 8px;
    cursor: zoom-in;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(15, 30, 60, 0.06);
}

.cart-item-thumb:hover {
    border-color: var(--bleu, #0060AE);
    box-shadow: 0 4px 14px rgba(0, 96, 174, 0.18);
    transform: translateY(-1px);
}

.cart-item-thumb-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    visibility: hidden; /* invisible tant que pas rendu */
}

.cart-item-thumb.has-preview .cart-item-thumb-canvas {
    visibility: visible;
}

.cart-item-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bleu, #0060AE);
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.cart-item-thumb.has-preview .cart-item-thumb-fallback {
    display: none;
}

/* Overlay loupe au survol */
.cart-item-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 96, 174, 0.55);
    color: #fff;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.cart-item-thumb:hover .cart-item-thumb-overlay {
    opacity: 1;
}

.cart-item-thumb-overlay svg {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    transform: scale(1);
    transition: transform 0.18s ease;
}

.cart-item-thumb:hover .cart-item-thumb-overlay svg {
    transform: scale(1.15);
}

/* ----- Modale ----- */

.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.pdf-modal.hidden {
    display: none !important;
}

.pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 30, 60, 0.7);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.pdf-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    height: calc(100vh - 4rem);
    max-height: 1100px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: pdfModalIn 0.18s ease-out;
}

@keyframes pdfModalIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid #E5E9F2;
    background: #F8FAFC;
    flex-shrink: 0;
}

.pdf-modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--ink, #0F1E3C);
    font-size: 0.95rem;
}

.pdf-modal-title svg { color: var(--bleu, #0060AE); }

.pdf-modal-title span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60vw;
}

.pdf-modal-close {
    background: transparent;
    border: 0;
    color: var(--muted, #6B7280);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.pdf-modal-close:hover { background: #E5E9F2; color: var(--ink, #0F1E3C); }

.pdf-modal-body {
    flex: 1;
    background: #4a5568;
    overflow-y: auto;
    padding: 1.5rem 0.5rem;
    position: relative;
}

.pdf-modal-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.pdf-modal-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: upload-spin 0.7s linear infinite;
}

.pdf-modal-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 0 0.5rem;
}

.pdf-modal-page {
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    border-radius: 2px;
    overflow: hidden;
    max-width: 100%;
}

.pdf-modal-page-canvas {
    display: block;
}

.pdf-modal-error {
    color: #fff;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(252, 165, 165, 0.4);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin: auto;
}

@media (max-width: 600px) {
    .pdf-modal { padding: 0; }
    .pdf-modal-content {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .pdf-modal-title span { max-width: 50vw; }
    .pdf-modal-body { padding: 0.75rem 0; }
    .cart-item-thumb { width: 90px; height: 120px; }
}

/* =====================================================
   PAGE 404
   ===================================================== */

.error-shell {
    background: var(--bg-soft, #F8FAFC);
    min-height: calc(100vh - 200px);
    padding: 4rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-container {
    max-width: 640px;
    text-align: center;
}

.error-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.error-illustration svg {
    filter: drop-shadow(0 8px 24px rgba(0, 96, 174, 0.15));
}

.error-title {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--ink, #0F1E3C);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.error-lead {
    font-size: 1.05rem;
    color: var(--muted, #6B7280);
    line-height: 1.55;
    margin: 0 auto 2rem;
    max-width: 480px;
}

.error-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.error-suggestions {
    background: #fff;
    border: 1px solid var(--border, #E5E9F2);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    text-align: left;
    box-shadow: 0 2px 8px rgba(15, 30, 60, 0.04);
}

.error-suggestions h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink, #0F1E3C);
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.error-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-suggestions li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border, #E5E9F2);
}

.error-suggestions li:last-child {
    border-bottom: 0;
}

.error-suggestions a {
    color: var(--text, #0F1E3C);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.error-suggestions a:hover {
    color: var(--bleu, #0060AE);
}

@media (max-width: 600px) {
    .error-shell { padding: 2.5rem 1rem; }
    .error-suggestions { padding: 1.25rem 1.5rem; }
    .error-actions { flex-direction: column; }
    .error-actions .btn { width: 100%; justify-content: center; }
}

/* =====================================================
   CARNET D'ADRESSES (sur /envoi)
   ===================================================== */

.addr-book-selector {
    background: linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 100%);
    border: 1px dashed #BFDBFE;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.addr-book-selector.hidden {
    display: none !important;
}

.addr-book-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bleu, #0060AE);
    white-space: nowrap;
    margin: 0;
}

.addr-book-select {
    flex: 1;
    min-width: 200px;
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid #BFDBFE;
    border-radius: 6px;
    background: #fff;
    color: var(--ink, #0F1E3C);
    cursor: pointer;
    transition: all 0.15s ease;
}

.addr-book-select:hover,
.addr-book-select:focus {
    border-color: var(--bleu, #0060AE);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 96, 174, 0.1);
}

@media (max-width: 600px) {
    .addr-book-selector { flex-direction: column; align-items: stretch; }
    .addr-book-select { min-width: 0; width: 100%; }
}

/* ====================================================================
   PAGE "CRÉER UN COMPTE" — Hero + benefits + form
   ==================================================================== */

.register-hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    padding: 3rem 0 3.5rem;
    margin-bottom: 0;
}
.register-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.register-hero-bg svg {
    width: 100%;
    height: 100%;
    display: block;
}
.register-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}
.register-hero-content .badge {
    background: rgba(255, 228, 19, 0.18);
    color: #FFE413;
    border: 1px solid rgba(255, 228, 19, 0.35);
    margin-bottom: 1rem;
}
.register-hero-content h1 {
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    line-height: 1.15;
    margin: 0 0 0.8rem;
    color: #fff;
    letter-spacing: -0.015em;
}
.register-hero-content .lead {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0;
}

/* Section principale */
.register-section {
    padding: 3rem 0 4rem;
    background: linear-gradient(180deg, #F8FAFC 0%, #fff 100%);
}
.register-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}
.register-form-wrap { order: 1; }   /* Form à GAUCHE */
.register-benefits  { order: 2; }   /* Benefits à DROITE */

/* ===== Colonne gauche : benefits ===== */
.register-benefits-title {
    font-size: 1.6rem;
    margin: 0 0 0.4rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.register-benefits-intro {
    color: var(--muted);
    margin: 0 0 1.5rem;
    line-height: 1.55;
}

.benefit-card {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 0.85rem;
    transition: all 0.25s ease;
}
.benefit-card:hover {
    border-color: var(--bleu);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 96, 174, 0.08);
}
.benefit-illu {
    flex-shrink: 0;
    width: 80px;
    height: 70px;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FB 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.benefit-illu svg {
    width: 100%;
    height: 100%;
    display: block;
}
.benefit-text {
    flex: 1;
    min-width: 0;
}
.benefit-text h3 {
    margin: 0 0 0.3rem;
    font-size: 1.02rem;
    color: var(--ink);
    line-height: 1.3;
    font-weight: 700;
}
.benefit-text p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Bloc trust en bas */
.register-trust {
    margin-top: 1.5rem;
    padding: 1.2rem 1.4rem;
    background: linear-gradient(135deg, #EFF6FB 0%, #FAFBFC 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.88rem;
    color: var(--text);
}
.trust-item svg {
    color: var(--bleu);
    flex-shrink: 0;
}

/* ===== Colonne droite : form ===== */
.register-form-wrap {
    position: sticky;
    top: 6rem;
}
.register-form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 12px 40px rgba(0, 96, 174, 0.08);
    border-top: 4px solid var(--bleu);
}
.register-form-card h2 {
    margin: 0 0 0.3rem;
    font-size: 1.5rem;
    color: var(--ink);
}
.register-form-sub {
    color: var(--muted);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}
.register-form-card .field-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}
.register-form-card .field {
    margin-bottom: 0.85rem;
}
.register-form-card .field label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
    color: var(--ink);
}
.register-form-card .field label .muted {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.82rem;
}
.register-form-card input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.register-form-card input:focus {
    outline: 0;
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(0, 96, 174, 0.12);
}
.register-form-card .btn-primary {
    margin-top: 0.5rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.register-legal {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 0.8rem;
    text-align: center;
}
.register-legal a {
    color: var(--bleu);
    text-decoration: underline;
}

.register-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.5rem 0 1rem;
    color: var(--muted);
    font-size: 0.85rem;
}
.register-divider::before,
.register-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.register-divider span {
    padding: 0 0.5rem;
}

.register-existing {
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

/* ===== Mobile ===== */
@media (max-width: 968px) {
    .register-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .register-form-wrap {
        position: static;
        /* form est déjà en order: 1 → reste en haut sur mobile (avant les benefits) */
    }
}

@media (max-width: 600px) {
    .register-hero { padding: 2rem 0 2.5rem; }
    .register-hero-content h1 { font-size: 1.7rem; }
    .register-section { padding: 2rem 0 2.5rem; }
    .register-form-card { padding: 1.5rem; }
    .register-form-card .field-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .benefit-card { padding: 0.9rem 1rem; gap: 0.85rem; }
    .benefit-illu { width: 64px; height: 56px; }
    .benefit-text h3 { font-size: 0.95rem; }
    .benefit-text p { font-size: 0.83rem; }
}
