/* ============================================================
   Précommande Form — style.css
   Palette: dark crimson (#5c1a1a) matching the original image
   ============================================================ */

:root {
    --pof-crimson:    #5c1a1a;
    --pof-crimson-lt: #7a2323;
    --pof-teal:       #2a6b6e;
    --pof-bg:         #ffffff;
    --pof-border:     #ddd9d4;
    --pof-border-focus: #2a6b6e;
    --pof-label:      #2d2d2d;
    --pof-placeholder:#a09898;
    --pof-error:      #c0392b;
    --pof-radius:     3px;
    --pof-font:       Georgia, 'Times New Roman', serif;
    --pof-sans:       -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --pof-transition: 0.18s ease;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.pof-wrapper {
    /* max-width is set inline by the shortcode from admin settings */
    margin: 0 auto;
    padding: 0 16px 48px;
    font-family: var(--pof-sans);
}

/* ── Card ─────────────────────────────────────────────────── */
.pof-card {
    background: var(--pof-bg);
    border: 1px solid #c8c4c0;
    border-radius: 2px;
    padding: 36px 40px 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

@media (max-width: 520px) {
    .pof-card { padding: 24px 20px 28px; }
}

/* ── Header ───────────────────────────────────────────────── */
.pof-header {
    margin-bottom: 28px;
}

.pof-title {
    font-family: var(--pof-font);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--pof-crimson);
    margin: 0 0 10px;
    letter-spacing: 0.01em;
}

.pof-divider {
    height: 2px;
    background: linear-gradient(to right, var(--pof-teal), transparent);
    border-radius: 1px;
}

/* ── Field layout ─────────────────────────────────────────── */
.pof-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .pof-row { grid-template-columns: 1fr; }
}

.pof-field {
    margin-bottom: 20px;
    position: relative;
}

.pof-field--full {
    grid-column: 1 / -1;
}

/* ── Labels ───────────────────────────────────────────────── */
.pof-field label {
    display: block;
    font-size: 0.875rem;
    color: var(--pof-label);
    margin-bottom: 6px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.pof-required {
    color: var(--pof-crimson);
    margin-left: 2px;
}

/* ── Inputs ───────────────────────────────────────────────── */
.pof-field input[type="text"],
.pof-field input[type="email"],
.pof-field input[type="tel"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: var(--pof-sans);
    color: var(--pof-label);
    background: #fff;
    border: 1px solid var(--pof-border);
    border-radius: var(--pof-radius);
    outline: none;
    transition: border-color var(--pof-transition), box-shadow var(--pof-transition);
}

.pof-field input[type="text"]::placeholder,
.pof-field input[type="email"]::placeholder,
.pof-field input[type="tel"]::placeholder {
    color: var(--pof-placeholder);
    font-style: italic;
}

.pof-field input:focus {
    border-color: var(--pof-border-focus);
    box-shadow: 0 0 0 3px rgba(42, 107, 110, 0.12);
}

.pof-field input.pof-has-error {
    border-color: var(--pof-error);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
}

/* ── Select ───────────────────────────────────────────────── */
.pof-select-wrap {
    position: relative;
}

.pof-select-wrap select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 36px 9px 12px;
    font-size: 0.9rem;
    font-family: var(--pof-sans);
    color: var(--pof-label);
    background: #fff;
    border: 1px solid var(--pof-border);
    border-radius: var(--pof-radius);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color var(--pof-transition), box-shadow var(--pof-transition);
}

.pof-select-wrap select:focus {
    border-color: var(--pof-border-focus);
    box-shadow: 0 0 0 3px rgba(42, 107, 110, 0.12);
}

.pof-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #888;
    pointer-events: none;
}

/* ── Errors ───────────────────────────────────────────────── */
.pof-error {
    display: block;
    font-size: 0.78rem;
    color: var(--pof-error);
    margin-top: 4px;
    min-height: 1em;
}

.pof-global-error {
    background: #fdf1f0;
    border: 1px solid #f5c5c2;
    border-radius: var(--pof-radius);
    color: var(--pof-error);
    padding: 12px 16px;
    font-size: 0.875rem;
    margin-bottom: 18px;
}

/* ── Submit button ────────────────────────────────────────── */
.pof-submit {
    display: flex;
    align-items: center;
    justify-content: center;
	text-transform:uppercase;
    gap: 10px;
    width: 100%;
    padding: 13px 24px;
    margin-top: 8px;
    background: var(--pof-crimson);
    color: #fff;
    border: none;
    border-radius: var(--pof-radius);
    font-family: inherit;
    cursor: pointer;
    transition: background var(--pof-transition), transform 0.1s;
}

.pof-submit:hover {
    background: var(--pof-crimson-lt);
}

.pof-submit:active {
    transform: scale(0.99);
}

.pof-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Spinner animation */
.pof-spinner svg {
    width: 18px;
    height: 18px;
    animation: pof-spin 0.8s linear infinite;
}

@keyframes pof-spin {
    to { transform: rotate(360deg); }
}

/* ── Success message ──────────────────────────────────────── */
.pof-success {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f0f8f1;
    border: 1px solid #a8d5ae;
    border-left: 4px solid #2e7d43;
    border-radius: var(--pof-radius);
    padding: 20px 24px;
    margin-top: 16px;
}

.pof-success svg {
    width: 28px;
    height: 28px;
    color: #2e7d43;
    flex-shrink: 0;
    margin-top: 2px;
}

.pof-success p {
    margin: 0;
    font-size: 0.95rem;
    color: #1e5530;
    line-height: 1.6;
}

/* ── Champ Produit verrouillé ─────────────────────────────── */
.pof-label-icon {
    width: 13px;
    height: 13px;
    vertical-align: middle;
    margin-right: 4px;
    color: var(--pof-crimson);
    position: relative;
    top: -1px;
}

.pof-product-field-wrap {
    position: relative;
}

.pof-input-locked {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 40px 9px 12px;
    font-size: 0.9rem;
    font-family: var(--pof-sans);
    font-weight: 600;
    color: #4a3030;
    background: #f5f0eb;
    border: 1px solid #c8bdb5;
    border-radius: var(--pof-radius);
    outline: none;
    cursor: not-allowed;
    user-select: none;
    letter-spacing: 0.01em;
}

.pof-input-locked:focus {
    border-color: #c8bdb5;
    box-shadow: none;
}

.pof-lock-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #a08070;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.pof-lock-icon svg {
    width: 15px;
    height: 15px;
}

.pof-product-warning {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 2px;
    padding: 5px 10px;
}

.pof-geo-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.76rem;
    color: #2a6b6e;
    opacity: 0.85;
}

/* ── Phone prefix badge ── */
.pof-phone-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pof-phone-prefix {
    position: absolute;
    left: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pof-teal);
    pointer-events: none;
    white-space: nowrap;
    z-index: 1;
}

.pof-phone-wrap input.pof-has-prefix {
    padding-left: 52px;
}
