/* Atelier Luminaires v1.1.0 — atelier.css */

/* ── Variables CSS ───────────────────────────────────────────────────────── */
/* Les variables --als-accent-* sont injectées dynamiquement via PHP        */
/* (wp_add_inline_style) selon la couleur d'accent choisie dans les réglages */

#al-app {
    max-width: 660px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: #1E293B;
    line-height: 1.6;
}

.al-hidden { display: none !important; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.al-hero {
    background: linear-gradient(135deg, var(--als-accent-dark) 0%, var(--als-accent) 100%);
    border-radius: 12px;
    padding: 32px 28px;
    margin-bottom: 28px;
    color: #fff;
}
.al-hero-badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: rgba(255,255,255,.15);
    border-radius: 99px;
    padding: 4px 14px;
    margin-bottom: 14px;
    color: var(--als-accent-soft);
}
.al-hero-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.3;
}
.al-hero-desc {
    font-size: 14px;
    color: var(--als-accent-soft);
    margin: 0 0 18px;
    line-height: 1.6;
}
.al-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.al-hero-meta span {
    font-size: 12px;
    background: rgba(255,255,255,.12);
    border-radius: 6px;
    padding: 5px 12px;
    color: var(--als-accent-mid);
}

/* ── Indicateurs étapes ──────────────────────────────────────────────────── */
#al-steps {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}
.al-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: .4;
    transition: opacity .2s;
    min-width: 48px;
}
.al-step-dot.al-step-active { opacity: 1; }
.al-step-dot.al-step-done   { opacity: .7; }
.al-step-dot span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #64748B;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.al-step-active span { background: var(--als-accent); color: #fff; }
.al-step-done span   { background: #16A34A; color: #fff; }
.al-step-done span::before { content: '✓'; }
.al-step-dot em { font-size: 11px; font-style: normal; color: #64748B; white-space: nowrap; }
.al-step-active em { color: var(--als-accent); font-weight: 600; }
.al-step-line { flex: 1; height: 2px; background: #E2E8F0; margin: 0 6px 16px; }

/* ── Panel ───────────────────────────────────────────────────────────────── */
.al-step-panel {
    background: #fff;
    border: 1.5px solid var(--als-accent-mid);
    border-radius: 12px;
    padding: 28px 24px;
}
.al-panel-title {
    font-size: 18px;
    font-weight: 800;
    color: #1E293B;
    margin: 0 0 6px;
}
.al-panel-sub {
    font-size: 13px;
    color: #94A3B8;
    margin: 0 0 20px;
}

/* ── Grille créneaux ─────────────────────────────────────────────────────── */
.al-slot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 4px;
}
@media (max-width: 480px) { .al-slot-grid { grid-template-columns: 1fr; } }

.al-slot-card {
    border: 2px solid var(--als-accent-mid);
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    position: relative;
    user-select: none;
}
.al-slot-card:hover { border-color: var(--als-accent-muted); background: var(--als-accent-pale); }
.al-slot-card.al-slot-selected {
    border-color: var(--als-accent);
    background: var(--als-accent-light);
    box-shadow: 0 0 0 3px rgba(var(--als-accent-rgb, 124,58,237),.12);
}
.al-slot-card:active { transform: scale(.98); }
.al-slot-jour {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--als-accent);
    margin-bottom: 4px;
}
.al-slot-heure {
    font-size: 17px;
    font-weight: 800;
    color: #1E293B;
}
.al-slot-check {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--als-accent-mid);
    color: var(--als-accent);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s;
}
.al-slot-selected .al-slot-check {
    background: var(--als-accent);
    color: #fff;
    opacity: 1;
}

/* ── Formulaire ──────────────────────────────────────────────────────────── */
.al-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) { .al-form-grid { grid-template-columns: 1fr; } }

.al-field-full { grid-column: 1 / -1; }

.al-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.al-req { color: #DC2626; }
.al-opt { color: #94A3B8; font-weight: 400; font-size: 12px; }

.al-input, .al-select {
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid var(--als-accent-soft);
    border-radius: 7px;
    font-size: 14.5px;
    color: #1E293B;
    background: #fff;
    transition: border-color .15s;
    box-sizing: border-box;
    font-family: inherit;
}
.al-input:focus, .al-select:focus {
    border-color: var(--als-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--als-accent-rgb, 124,58,237),.1);
}
textarea.al-input { resize: vertical; }

/* ── Privatisation ───────────────────────────────────────────────────────── */
.al-priv-block { margin-top: 16px; }
.al-priv-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--als-accent-soft);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.al-priv-toggle:hover { border-color: var(--als-accent-muted); background: var(--als-accent-pale); }
.al-priv-toggle[aria-checked="true"] {
    border-color: var(--als-accent);
    background: var(--als-accent-light);
}
.al-priv-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 2px solid var(--als-accent-soft);
    background: #fff;
    margin-top: 2px;
    transition: background .15s, border-color .15s;
    position: relative;
}
.al-priv-check.al-priv-checked {
    background: var(--als-accent);
    border-color: var(--als-accent);
}
.al-priv-check.al-priv-checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.al-priv-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1E293B;
}
.al-priv-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--als-accent);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.al-priv-detail {
    display: block;
    font-size: 12px;
    color: #64748B;
    margin-top: 2px;
}

/* ── Notice atelier partagé ─────────────────────────────────────────────── */
.al-shared-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 12px;
    font-size: 13px;
    color: #1E40AF;
    line-height: 1.5;
}
.al-shared-icon { flex-shrink: 0; font-size: 16px; }

/* ── Montant ─────────────────────────────────────────────────────────────── */
.al-amount-box {
    background: var(--als-accent-pale);
    border: 1px solid var(--als-accent-soft);
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: var(--als-accent-text);
}
.al-amount-label { color: var(--als-accent); }
.al-amount-calc  { color: #94A3B8; font-size: 12px; }
.al-amount-total { font-size: 22px; font-weight: 800; color: #1E293B; margin-left: auto; }
.al-amount-saving{ font-size: 12px; background: #DCFCE7; color: #166534; border-radius: 99px; padding: 2px 10px; font-weight: 700; }

/* ── Récapitulatif ───────────────────────────────────────────────────────── */
.al-recap-card {
    background: var(--als-accent-pale);
    border: 1.5px solid var(--als-accent-soft);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}
.al-recap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.al-recap-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--als-accent-mid);
    vertical-align: top;
}
.al-recap-table tr:last-child td { border-bottom: none; }
.al-recap-label {
    width: 36%;
    color: var(--als-accent-text);
    font-weight: 600;
    padding-right: 8px;
    background: var(--als-accent-light);
}

/* ── Info box ────────────────────────────────────────────────────────────── */
.al-info-box {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.al-info-box p { margin: 0; font-size: 13px; color: #1E40AF; line-height: 1.6; }

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.al-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.al-btn {
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: filter .15s, transform .1s;
    font-family: inherit;
}
.al-btn:active { transform: scale(.98); }
.al-btn:disabled { opacity: .55; cursor: not-allowed; }

.al-btn-primary  { background: var(--als-accent); color: #fff; }
.al-btn-primary:hover { filter: brightness(1.08); }
.al-btn-cta      { background: linear-gradient(90deg, var(--als-accent), #A855F7); padding: 13px 28px; font-size: 15px; }
.al-btn-cta:hover { filter: brightness(1.06); }
.al-btn-ghost    { background: var(--als-accent-light); color: var(--als-accent-text); border: 1.5px solid var(--als-accent-soft); }
.al-btn-ghost:hover { background: var(--als-accent-mid); }
.al-btn-full     { width: 100%; justify-content: center; }

/* ── Erreur ──────────────────────────────────────────────────────────────── */
.al-error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 13px;
    margin-top: 10px;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.al-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: al-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes al-spin { to { transform: rotate(360deg); } }

/* ── Confirmation ────────────────────────────────────────────────────────── */
.al-confirm-panel {
    text-align: center;
    padding: 52px 24px;
    background: linear-gradient(135deg, var(--als-accent-light), #EFF6FF);
    border: 2px solid var(--als-accent-soft);
    border-radius: 14px;
}
.al-confirm-icon  { font-size: 52px; margin-bottom: 16px; }
.al-confirm-title { font-size: 22px; font-weight: 800; color: var(--als-accent-dark); margin: 0 0 12px; }
.al-confirm-text  { font-size: 14px; color: var(--als-accent-text); line-height: 1.7; margin: 0 0 12px; }
.al-confirm-sub   { font-size: 14px; color: var(--als-accent-muted); margin: 0; }

/* ── Honeypot anti-bot ───────────────────────────────────────────────────── */
.al-hp-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    /* tabindex=-1 est un attribut HTML sur l'input, pas une propriété CSS */
}

/* ── Captcha mathématique ────────────────────────────────────────────────── */
.al-captcha-block {
    margin-top: 16px;
    padding: 16px 18px;
    background: var(--als-accent-light);
    border: 1.5px solid var(--als-accent-mid);
    border-radius: 10px;
}

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

.al-captcha-question {
    font-size: 15px;
    font-weight: 700;
    color: var(--als-accent-text);
    white-space: nowrap;
    font-family: Georgia, serif;
    letter-spacing: .01em;
}

.al-captcha-input {
    width: 80px !important;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 10px;
    /* Masquer les flèches numériques (Chrome, Safari, Edge) */
    -moz-appearance: textfield;
}
.al-captcha-input::-webkit-outer-spin-button,
.al-captcha-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.al-captcha-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--als-accent-muted);
    font-family: Arial, sans-serif;
}

/* ── Acceptation CGV ─────────────────────────────────────────────────────── */
.al-cgv-block {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--als-accent-light);
    border: 1.5px solid var(--als-accent-mid);
    border-radius: 10px;
}

.al-cgv-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--als-accent-text);
    line-height: 1.5;
    user-select: none;
}

.al-cgv-checkbox {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: var(--als-accent);
    cursor: pointer;
}

.al-cgv-label a,
.al-cgv-label span a {
    color: var(--als-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.al-cgv-label a:hover {
    color: var(--als-accent-text);
}
