/* ==========================================================================
   Uniwork — Formulaires natifs + bandeau cookies
   (chargé sur tout le site : le bandeau cookies est global)
   ========================================================================== */

/* ---------- Formulaires ---------- */
.uw-form {
    background: #F5F2EC;
    padding: 40px;
    font-family: var(--font-body, 'Inter', sans-serif);
}
.uw-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
    margin-bottom: 26px;
}
.uw-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.uw-field--full { grid-column: 1 / -1; }
.uw-field label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1A1A1A;
}
.uw-req { color: var(--color-terracotta, #D84315); }
.uw-field input,
.uw-field select,
.uw-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px;
    font: inherit;
    font-size: 15px;
    color: #1A1A1A;
    background: #fff;
    border: 1px solid #D9D3C7;
    border-radius: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.uw-field select {
    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 fill='none' stroke='%231A1A1A' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.uw-field textarea { resize: vertical; min-height: 140px; }
.uw-field input:focus,
.uw-field select:focus,
.uw-field textarea:focus {
    outline: none;
    border-color: #1A1A1A;
    box-shadow: 0 0 0 3px rgba(216, 67, 21, 0.15);
}
.uw-field--error input,
.uw-field--error select,
.uw-field--error textarea { border-color: #B3261E; }
.uw-field-err { font-size: 13px; color: #B3261E; }

.uw-form-errors {
    background: #FDECEA;
    border-left: 3px solid #B3261E;
    color: #7A1C16;
    padding: 12px 16px;
    margin-bottom: 22px;
    font-size: 14px;
}
.uw-form-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-terracotta, #D84315);
    color: #fff;
    border: 0;
    padding: 17px 32px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}
.uw-form-btn:hover { background: #B33810; color: #fff; transform: translateY(-2px); }
.uw-form-btn:focus-visible { outline: 2px solid #1A1A1A; outline-offset: 3px; }

.uw-form-legal {
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.6;
    color: #777;
}
.uw-form-legal a { color: #777; text-decoration: underline; }

.uw-form-success {
    background: #F5F2EC;
    border-left: 3px solid var(--color-terracotta, #D84315);
    padding: 32px 36px;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
}
.uw-form-success p { margin: 0 0 16px; }
.uw-form-success p:last-child { margin-bottom: 0; }

/* Champ piège anti-robot : hors écran (pas display:none, que certains robots détectent) */
.uw-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Page contact : colonne formulaire */
.contact-form-wrap { min-width: 0; }
.contact-form-wrap .uw-form-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 28px;
    margin: 0 0 22px;
}

/* Page devenir distributeur */
.devenir-formulaire { padding: 80px 0 100px; }
.devenir-formulaire-inner { max-width: 820px; margin: 0 auto; }
.devenir-formulaire-intro { text-align: center; margin-bottom: 36px; color: #555; font-size: 16px; line-height: 1.7; }

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr !important; gap: 48px !important; }
}
@media (max-width: 640px) {
    .uw-form { padding: 26px 20px; }
    .uw-form-grid { grid-template-columns: 1fr; }
    .uw-form-btn { width: 100%; justify-content: center; }
}

/* ---------- Bandeau cookies ---------- */
.uw-cc[hidden] { display: none !important; }
.uw-cc {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    justify-content: center;
    pointer-events: none;
    font-family: var(--font-body, 'Inter', sans-serif);
}
.uw-cc-box {
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: 760px;
    background: #fff;
    color: #1A1A1A;
    border-top: 3px solid var(--color-terracotta, #D84315);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    padding: 26px 28px 22px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.uw-cc-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    padding-right: 170px;
}
.uw-cc-text { font-size: 14px; line-height: 1.6; color: #444; margin: 0 0 18px; }
.uw-cc-text a { color: var(--color-terracotta, #D84315); text-decoration: underline; }
.uw-cc-skip {
    position: absolute;
    top: 22px;
    right: 24px;
    background: none;
    border: 0;
    padding: 4px 0;
    font: inherit;
    font-size: 13px;
    color: #555;
    text-decoration: underline;
    cursor: pointer;
}
.uw-cc-prefs { border-top: 1px solid #eee; margin: 0 0 18px; }
.uw-cc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.uw-cc-row strong { display: block; font-size: 14px; margin-bottom: 3px; }
.uw-cc-row span { display: block; font-size: 12.5px; color: #666; line-height: 1.5; }
.uw-cc-always { flex-shrink: 0; font-size: 12px !important; color: #2E7D32 !important; font-weight: 600; }
.uw-cc-switch {
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    appearance: none;
    -webkit-appearance: none;
    background: #ccc;
    border-radius: 24px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    margin: 0;
}
.uw-cc-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}
.uw-cc-switch:checked { background: var(--color-terracotta, #D84315); }
.uw-cc-switch:checked::after { transform: translateX(20px); }
.uw-cc-switch:focus-visible { outline: 2px solid #1A1A1A; outline-offset: 2px; }

.uw-cc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.uw-cc-btn {
    flex: 0 0 auto;
    padding: 12px 22px;
    border: 1px solid #1A1A1A;
    background: #1A1A1A;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.uw-cc-btn:hover { background: #333; }
.uw-cc-btn--ghost { background: transparent; color: #1A1A1A; }
.uw-cc-btn--ghost:hover { background: #1A1A1A; color: #fff; }
.uw-cc-btn[hidden] { display: none; }
.uw-cc-btn:focus-visible { outline: 2px solid var(--color-terracotta, #D84315); outline-offset: 2px; }

@media (max-width: 640px) {
    .uw-cc { left: 0; right: 0; bottom: 0; }
    .uw-cc-box { padding: 22px 18px 18px; }
    .uw-cc-title { padding-right: 0; margin-top: 22px; }
    .uw-cc-skip { top: 12px; right: 16px; }
    .uw-cc-actions { flex-direction: column; }
    .uw-cc-btn { width: 100%; }
}

/* Lien « Gestion des cookies » du footer (bouton stylé comme les liens voisins) */
.footer-legal .uw-cc-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.footer-legal .uw-cc-link:hover { text-decoration: underline; }
