/* ============================================================================
   GDPR-FORM.CSS — Styles additionnels propres au formulaire RGPD Mayoly
   Ce fichier COMPLÈTE style.css (fourni) sans le dupliquer. Il gère :
   - la mise en page générale (header, footer, sections)
   - le branding dynamique (couleurs injectées via variables CSS --brand-*)
   - le captcha interne
   - les messages d'alerte
   - le responsive mobile
   ============================================================================ */

:root {
    --brand-primary: #002060;
    --brand-secondary: #00B3D4;
    --brand-accent: #005CA8;
}

* {
    box-sizing: border-box;
}

body {
    padding: 0;
}

.gdpr-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* -------------------- HEADER -------------------- */
.gdpr-header {
    background: #ffffff;
    border-bottom: 4px solid var(--brand-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gdpr-header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gdpr-logo {
    max-height: 56px;
    max-width: 240px;
    object-fit: contain;
}

.gdpr-lang-switch {
    font-size: 0.9em;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gdpr-lang-switch a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: bold;
}

.gdpr-lang-switch a.active {
    text-decoration: underline;
}

.gdpr-lang-switch .sep {
    color: #ccc;
}

/* -------------------- MAIN -------------------- */
.gdpr-main {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.gdpr-main h1 {
    color: var(--brand-primary);
    font-size: 1.7em;
    text-align: left;
    margin-bottom: 16px;
}

.gdpr-intro {
    color: #444;
    margin-bottom: 12px;
    font-size: 0.97em;
}

.gdpr-intro-delay {
    font-style: italic;
    color: #666;
}

/* -------------------- ALERT BOX -------------------- */
.gdpr-alert {
    border-radius: 6px;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 0.95em;
    border: 1px solid transparent;
}

.gdpr-alert.gdpr-alert-error {
    background: #fdecea;
    border-color: #f5c6cb;
    color: #7a1f1f;
}

.gdpr-alert.gdpr-alert-success {
    background: #e9f7ef;
    border-color: #b7e4c7;
    color: #1e5631;
}

/* -------------------- FORM -------------------- */
form {
    margin: 24px auto;
    align-items: stretch;
}

.gdpr-section {
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
}

.gdpr-section h2 {
    background-color: var(--brand-primary);
    font-size: 1.05em;
    text-align: left;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.gdpr-field {
    width: 100%;
    margin-bottom: 18px;
}

.gdpr-field-row {
    display: flex;
    gap: 20px;
    width: 100%;
    flex-wrap: wrap;
}

.gdpr-field-row .gdpr-field {
    flex: 1 1 240px;
}

.gdpr-field label {
    display: block;
    margin-bottom: 6px;
}

.gdpr-field input[type="text"],
.gdpr-field input[type="email"],
.gdpr-field input[type="date"],
.gdpr-field input[type="number"],
.gdpr-field select,
.gdpr-field textarea {
    width: 100%;
}

.gdpr-help {
    font-size: 0.82em;
    color: #777;
    margin-top: 4px;
    font-style: italic;
}

.req {
    color: #c0392b;
    font-weight: bold;
}

.gdpr-radio-grid,
.gdpr-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 8px 24px;
}

.gdpr-checkbox-grid div,
.gdpr-radio-grid div {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.gdpr-checkbox-grid input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.gdpr-checkbox-single {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.gdpr-checkbox-single input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.gdpr-checkbox-single label {
    font-weight: normal;
    margin: 0;
}

/* -------------------- HONEYPOT (champ anti-bot invisible) -------------------- */
.gdpr-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* -------------------- CAPTCHA INTERNE -------------------- */
.gdpr-captcha-box {
    background: #f9f9fb;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 14px 16px;
}

.gdpr-internal-captcha {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.gdpr-captcha-question {
    font-size: 0.95em;
    color: #333;
}

.gdpr-captcha-input {
    width: 120px !important;
    flex: none;
}

/* -------------------- ACTIONS -------------------- */
.gdpr-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.gdpr-actions button {
    background-color: var(--brand-primary);
    min-width: 220px;
    font-size: 1.05em;
}

.gdpr-actions button:hover {
    background-color: var(--brand-accent);
}

.gdpr-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* -------------------- FIELD ERROR STATE -------------------- */
.gdpr-field.has-error input,
.gdpr-field.has-error select,
.gdpr-field.has-error textarea {
    border-color: #c0392b !important;
    background-color: #fdf3f2;
}

.gdpr-field-error-msg {
    color: #c0392b;
    font-size: 0.82em;
    margin-top: 4px;
    display: none;
}

.gdpr-field.has-error .gdpr-field-error-msg {
    display: block;
}

/* -------------------- FOOTER -------------------- */
.gdpr-footer {
    text-align: center;
    padding: 18px;
    font-size: 0.8em;
    color: #888;
    background: #eceef3;
}

/* -------------------- SUCCESS PAGE -------------------- */
.gdpr-success-box {
    max-width: 600px;
    margin: 60px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 40px 32px;
    text-align: center;
}

.gdpr-success-box .gdpr-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
}

.gdpr-success-box h1 {
    color: var(--brand-primary);
    font-size: 1.4em;
}

.gdpr-success-box .gdpr-reference {
    margin-top: 16px;
    font-weight: bold;
    color: var(--brand-primary);
    background: #f4f6fb;
    padding: 10px;
    border-radius: 6px;
    display: inline-block;
}

.gdpr-success-box .btn-back {
    display: inline-block;
    margin-top: 24px;
    background: var(--brand-primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 5px;
    text-decoration: none;
}

.gdpr-success-box .btn-back:hover {
    background: var(--brand-accent);
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 640px) {
    .gdpr-header-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .gdpr-field-row {
        flex-direction: column;
        gap: 0;
    }

    .gdpr-radio-grid,
    .gdpr-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .gdpr-main {
        padding: 20px 14px 40px;
    }

    .gdpr-section h2 {
        font-size: 0.95em;
    }

    form {
        padding: 16px;
    }
}
