/* ── Reparation33 — Frontend CSS — Design Moderne Card v3 ─────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Mono:wght@400;700&display=swap');

/* ── VARIABLES ─────────────────────────────────────────────────────── */
:root {
    --rep-blue:       #0057FF;
    --rep-blue-dark:  #0041cc;
    --rep-blue-light: #e8eeff;
    --rep-blue-glow:  rgba(0, 87, 255, 0.14);
    --rep-text:       #1a1d27;
    --rep-muted:      #6b7280;
    --rep-border:     #e2e5ee;
    --rep-bg:         #f5f7fb;
    --rep-white:      #ffffff;
    --rep-red:        #ef4444;
    --rep-green:      #16a34a;
    --rep-radius-sm:  8px;
    --rep-radius:     14px;
    --rep-radius-lg:  20px;
    --rep-shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --rep-shadow:     0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
    --rep-shadow-lg:  0 12px 40px rgba(0, 87, 255, .10), 0 2px 8px rgba(0,0,0,.06);
    --rep-font:       'DM Sans', system-ui, sans-serif;
    --rep-mono:       'Space Mono', monospace;
    --rep-transition: .2s cubic-bezier(.4, 0, .2, 1);
}

/* ── RESET WRAP ─────────────────────────────────────────────────────── */
.rep33-form-header { display: none; }

.rep33-wrap {
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--rep-font);
    color: var(--rep-text);
    background: var(--rep-bg);
    padding: 28px 20px 36px;
    border-radius: var(--rep-radius-lg);
}

/* ── CARD / SECTION ─────────────────────────────────────────────────── */
.rep33-section {
    background: var(--rep-white);
    border: 1px solid var(--rep-border);
    border-radius: var(--rep-radius);
    box-shadow: var(--rep-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow var(--rep-transition);
}

.rep33-section:hover {
    box-shadow: var(--rep-shadow-lg);
}

/* ── EN-TÊTE DE CARTE ────────────────────────────────────────────────── */
.rep33-section-title {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--rep-blue) 0%, #2979ff 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding: 16px 24px;
    margin: 0;
    line-height: 1;
    font-family: var(--rep-font);
    position: relative;
}

.rep33-section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: rgba(255,255,255,.12);
}

/* ── CORPS DE LA CARTE ──────────────────────────────────────────────── */
.rep33-section-body {
    padding: 24px 24px 8px;
}

/* ── GRILLE ─────────────────────────────────────────────────────────── */
.rep33-row   { display: flex; gap: 16px; }
.rep33-group { flex: 1; margin-bottom: 18px; }

/* ── LABELS ─────────────────────────────────────────────────────────── */
.rep33-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--rep-muted);
    letter-spacing: .4px;
    text-transform: uppercase;
}

.req { color: var(--rep-red); font-size: 14px; line-height: 1; }

/* ── CHAMPS ──────────────────────────────────────────────────────────── */
.rep33-wrap input[type="text"],
.rep33-wrap input[type="email"],
.rep33-wrap input[type="tel"],
.rep33-wrap select,
.rep33-wrap textarea {
    display: block;
    width: 100%;
    padding: 11px 15px;
    font-family: var(--rep-font);
    font-size: 14.5px;
    font-weight: 400;
    color: var(--rep-text);
    background: #fafbff;
    border: 1.5px solid var(--rep-border);
    border-radius: var(--rep-radius-sm);
    box-sizing: border-box;
    box-shadow: var(--rep-shadow-sm);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--rep-transition), box-shadow var(--rep-transition), background var(--rep-transition);
    margin: 0;
    line-height: 1.4;
}

.rep33-wrap input[type="text"]::placeholder,
.rep33-wrap input[type="email"]::placeholder,
.rep33-wrap input[type="tel"]::placeholder,
.rep33-wrap textarea::placeholder {
    color: #c2c8d8;
    font-weight: 300;
}

.rep33-wrap input[type="text"]:focus,
.rep33-wrap input[type="email"]:focus,
.rep33-wrap input[type="tel"]:focus,
.rep33-wrap select:focus,
.rep33-wrap textarea:focus {
    border-color: var(--rep-blue);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3.5px var(--rep-blue-glow), var(--rep-shadow-sm);
}

/* ── SELECT PERSONNALISÉ ─────────────────────────────────────────────── */
.rep33-wrap select {
    background-color: #fafbff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230057FF' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ── TEXTAREA ────────────────────────────────────────────────────────── */
.rep33-wrap textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ── CHECKBOX ────────────────────────────────────────────────────────── */
.rep33-checkbox-group { display: flex; align-items: center; }

.rep33-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
    font-weight: 400;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--rep-text);
}

.rep33-wrap input[type="checkbox"] {
    width: 18px; height: 18px; min-width: 18px;
    margin-top: 2px; flex-shrink: 0;
    padding: 0;
    border: 2px solid var(--rep-border);
    border-radius: 5px;
    box-shadow: none;
    -webkit-appearance: checkbox; appearance: checkbox;
    accent-color: var(--rep-blue);
    cursor: pointer;
    transition: border-color var(--rep-transition);
}

.rep33-wrap input[type="checkbox"]:hover {
    border-color: var(--rep-blue);
}

/* ── BOÎTE INFO ──────────────────────────────────────────────────────── */
.rep33-info-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--rep-blue-light);
    border: 1px solid rgba(0, 87, 255, .15);
    border-radius: var(--rep-radius-sm);
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.7;
    color: #1a2a6c;
}

/* ── CONDITIONS ──────────────────────────────────────────────────────── */
.rep33-cg {
    background: #fafbfc;
    border: 1.5px solid var(--rep-border);
    border-radius: var(--rep-radius-sm);
    padding: 16px 18px;
    margin-bottom: 22px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--rep-text);
}

/* ── BOUTON SUBMIT ───────────────────────────────────────────────────── */
#rep33-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, var(--rep-blue) 0%, #2979ff 100%);
    color: #fff;
    padding: 16px 24px;
    border: none;
    border-radius: var(--rep-radius-sm);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: .8px;
    cursor: pointer;
    font-family: var(--rep-font);
    -webkit-appearance: none;
    text-transform: uppercase;
    box-shadow: 0 4px 18px rgba(0, 87, 255, .35);
    transition: box-shadow var(--rep-transition), transform var(--rep-transition), background var(--rep-transition);
    position: relative;
    overflow: hidden;
}

#rep33-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.08) 0%, transparent 60%);
    pointer-events: none;
}

#rep33-submit:hover {
    background: linear-gradient(135deg, var(--rep-blue-dark) 0%, var(--rep-blue) 100%);
    box-shadow: 0 6px 24px rgba(0, 87, 255, .45);
    transform: translateY(-2px);
}

#rep33-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 87, 255, .3);
}

#rep33-submit:disabled {
    background: #c7cfee;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ── SPINNER ─────────────────────────────────────────────────────────── */
.rep33-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rep33-spin .7s linear infinite;
    display: inline-block;
}
@keyframes rep33-spin { to { transform: rotate(360deg); } }

/* ── NOTE BAS ────────────────────────────────────────────────────────── */
.rep33-note {
    text-align: center;
    font-size: 12px;
    color: var(--rep-muted);
    margin-top: 12px;
    line-height: 1.5;
}

/* ── MESSAGES ────────────────────────────────────────────────────────── */
#rep33-msg { margin-bottom: 16px; }

.rep33-error {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--rep-radius-sm);
    color: #b91c1c;
    padding: 13px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.rep33-error::before {
    content: '⚠';
    font-size: 15px;
    flex-shrink: 0;
}

/* ── SUCCÈS ──────────────────────────────────────────────────────────── */
.rep33-success-box {
    text-align: center;
    background: var(--rep-white);
    border: 1px solid var(--rep-border);
    border-radius: var(--rep-radius-lg);
    padding: 48px 32px;
    box-shadow: var(--rep-shadow-lg);
}

.rep33-success-icon {
    font-size: 60px;
    margin-bottom: 16px;
    display: block;
    animation: rep33-pop .4s cubic-bezier(.175,.885,.32,1.275) both;
}

@keyframes rep33-pop {
    from { transform: scale(.4); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

.rep33-success-box h3 {
    color: var(--rep-text);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
}

/* ── N° DE COMMANDE ──────────────────────────────────────────────────── */
.rep33-order-num {
    display: inline-block;
    font-family: var(--rep-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--rep-blue);
    background: var(--rep-blue-light);
    border: 1.5px solid rgba(0, 87, 255, .2);
    padding: 9px 20px;
    border-radius: 40px;
    margin: 14px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ── ADRESSE CONFIRMATION ────────────────────────────────────────────── */
.rep33-addr-confirm {
    background: var(--rep-bg);
    border: 1.5px solid var(--rep-border);
    border-radius: var(--rep-radius-sm);
    padding: 14px 20px;
    margin-top: 18px;
    font-size: 13.5px;
    line-height: 1.9;
    display: inline-block;
    text-align: left;
    color: var(--rep-text);
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .rep33-wrap {
        padding: 16px 12px 28px;
        border-radius: var(--rep-radius);
    }
    .rep33-row { flex-direction: column; gap: 0; }
    .rep33-section-title { font-size: 10.5px; letter-spacing: 1.2px; padding: 11px 18px; }
    .rep33-section-body { padding: 18px 16px 4px; }
    #rep33-submit { font-size: 13.5px; padding: 14px 20px; }
}
