/* ============================================================
   CAMPING PRÉSENCE — Design System
   Inspiré de loan.guewen.fr : zinc/slate, Inter, bold, data-forward.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* === Inputs & Textarea (éléments bruts, pas de classe Tailwind) === */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="date"],
textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #0f172a;
    background-color: #ffffff;
    font-family: inherit;
    font-weight: 500;
    transition: border-color 0.12s, box-shadow 0.12s;
    appearance: none;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}
input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder { color: #94a3b8; font-weight: 400; }

/* === Select avec chevron === */
select {
    display: block;
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #0f172a;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: border-color 0.12s, box-shadow 0.12s;
    min-height: 38px;
}
select:focus {
    outline: none;
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #18181b;
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
}

/* === Boutons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary  { background: #18181b; color: #fff; }
.btn-primary:hover  { background: #3f3f46; color: #fff; }

.btn-secondary { background: #f1f5f9; color: #1e293b; }
.btn-secondary:hover { background: #e2e8f0; color: #1e293b; }

.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }

.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-block { width: 100%; justify-content: center; }

/* === Alertes (utilisées par PHP + JS) === */
.alert {
    padding: 0.7rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

/* === Classes générées par JavaScript === */

/* Cases à cocher des campeurs */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.checkbox-item:last-child { border-bottom: none; }
.checkbox-item label {
    flex: 1;
    cursor: pointer;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 500;
}
.checkbox-item strong { color: #0f172a; font-weight: 700; }

/* Message de chargement */
.loading {
    padding: 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Message d'erreur inline */
.error {
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.4rem;
    padding: 0.35rem 0.6rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
}

/* État soumission du formulaire */
.form-submitting { opacity: 0.75; pointer-events: none; }

/* Icône dans les boutons */
.icon { width: 1rem; height: 1rem; }

/* Animation spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* === Print === */
@media print {
    header { display: none !important; }
    body { background: white; }
}
