
/* ==========================================================================
    VARIABLES & RESET
    ========================================================================== */
:root {
    --bg-main: #0B0B0F;
    --bg-card: rgba(17, 17, 24, 0.6);
    --bg-card-solid: #111118;
    --gold-primary: #D6B57A;
    --gold-dark: #B88B3D;
    --gold-light: #F2D59F;
    --text-light: #F5EFE6;
    --text-muted: #CBBBA3;
    --error: #E57373;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-light);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding-bottom: 90px; /* Espace pour le sticky button */
}

/* ==========================================================================
    BACKGROUND & EFFECTS
    ========================================================================== */
.bg-pattern {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Motif géométrique islamique subtil en or */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M30 60L15 45 0 60V30l15 15 15-15L45 45l15-15v30L45 45 30 60zm0-60L15 15 0 0v30l15-15 15 15L45 15 60 30V0L45 15 30 0zM15 45L0 30v-2.1L15 42.9l15-15L45 42.9l15-15V30L45 45 30 30 15 45z' fill='%23D6B57A' fill-opacity='0.04'/%3E%3C/g%3E%3C/svg%3E");
    z-index: -2;
}

.glow-effect {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 300px;
    background: radial-gradient(circle, rgba(214,181,122,0.15) 0%, rgba(11,11,15,0) 70%);
    z-index: -1;
    filter: blur(40px);
    animation: pulseGlow 4s infinite alternate;
}

/* ==========================================================================
    RAMADAN DECORATIONS
    ========================================================================== */
.lantern {
    position: absolute;
    top: -10px;
    z-index: -1;
    transform-origin: top center;
    animation: swing 4s ease-in-out infinite alternate;
    opacity: 0.8;
}

.lantern-left {
    left: 5%;
    animation-delay: 0s;
}

.lantern-right {
    right: 5%;
    animation-delay: -2s; /* Désynchronisé pour un effet naturel */
    transform: scale(0.85); /* Légèrement plus petite */
}

.star-decoration {
    position: absolute;
    color: var(--gold-primary);
    font-size: 1.2rem;
    opacity: 0.3;
    z-index: -1;
    animation: twinkle 3s ease-in-out infinite;
}

.star-1 { top: 15%; left: 10%; animation-delay: 0s; font-size: 0.8rem; }
.star-2 { top: 8%; right: 15%; animation-delay: 1s; font-size: 1.5rem; }
.star-3 { top: 40%; left: 5%; animation-delay: 2s; font-size: 1rem; }
.star-4 { top: 35%; right: 8%; animation-delay: 0.5s; font-size: 0.9rem; }

.crescent-moon {
    position: absolute;
    top: -30px; /* Déplacé tout en haut */
    right: -40px; /* Poussé vers le bord droit */
    width: 220px;
    height: 220px;
    opacity: 0.05; /* Plus discret pour ne pas gêner */
    z-index: -1;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
}

/* ==========================================================================
    LAYOUT
    ========================================================================== */
.container {
    width: 100%;
    max-width: 480px; /* Tablet/Desktop constraint */
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==========================================================================
    TYPOGRAPHY & HERO
    ========================================================================== */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.hero {
    text-align: center;
    padding: 20px 0 10px;
    animation: fadeIn 1s ease-out;
}

.badge {
    display: inline-block;
    background: rgba(214, 181, 122, 0.1);
    color: var(--gold-primary);
    border: 1px solid rgba(214, 181, 122, 0.3);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 2.2rem;
    color: var(--gold-primary);
    margin-bottom: 8px;
    background: linear-gradient(to right, var(--gold-light), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
}

/* Utilitaires d'apparition en cascade */
.slide-up {
    opacity: 0;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.5s; }
.delay-4 { animation-delay: 0.7s; }
.delay-5 { animation-delay: 0.9s; }

/* ==========================================================================
    CARDS (GLASSMORPHISM)
    ========================================================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(214, 181, 122, 0.15);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
    FORM ELEMENTS
    ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(214, 181, 122, 0.2);
    border-radius: var(--border-radius-sm);
    color: var(--text-light);
    font-size: 1rem;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

/* Prevenir le zoom auto sur iOS */
@media screen and (-webkit-min-device-pixel-ratio:0) { 
    select, textarea, input { font-size: 16px !important; }
}

.input-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(214, 181, 122, 0.1);
}

.input-control::placeholder {
    color: rgba(203, 187, 163, 0.4);
}

.error-message {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 6px;
    display: none;
}

.form-group.invalid .input-control {
    border-color: var(--error);
}
.form-group.invalid .error-message {
    display: block;
}

#group-formula.invalid .per-person-formulas .input-control {
    border-color: var(--error);
}

/* STEPPER */
.stepper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(214, 181, 122, 0.2);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.stepper-btn {
    background: transparent;
    border: none;
    color: var(--gold-primary);
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.stepper-btn:hover, .stepper-btn:active {
    background: rgba(214, 181, 122, 0.1);
}

.stepper-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    outline: none;
    -moz-appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* FORMULAS CARDS */
.formulas-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.formulas-grid.formulas-grid-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.helper-text {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.per-person-formulas {
    margin-top: 14px;
    display: none;
    padding: 14px;
    border: 1px dashed rgba(214, 181, 122, 0.3);
    border-radius: var(--border-radius-sm);
    background: rgba(0, 0, 0, 0.35);
}

.per-person-formulas.active {
    display: block;
}

.per-person-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.per-person-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--gold-primary);
    font-weight: 600;
}

.per-person-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.per-person-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.person-row {
    border: 1px solid rgba(214, 181, 122, 0.15);
    border-radius: 14px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.person-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.person-tag::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-primary);
    box-shadow: 0 0 10px rgba(214, 181, 122, 0.4);
}

.person-preview {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.per-person-summary {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--gold-light);
}

.formula-label {
    cursor: pointer;
    display: block;
    -webkit-tap-highlight-color: transparent;
}

.formula-label input[type="radio"] {
    display: none;
}

.formula-card-inner {
    border: 1px solid rgba(214, 181, 122, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.formula-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.formula-title {
    color: var(--text-light);
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Playfair Display', serif;
}

.formula-price {
    background: rgba(214, 181, 122, 0.15);
    color: var(--gold-primary);
    border: 1px solid rgba(214, 181, 122, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    margin-left: 10px;
}

.formula-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.formula-label input[type="radio"]:checked + .formula-card-inner {
    border-color: var(--gold-primary);
    background: rgba(214, 181, 122, 0.1);
    box-shadow: 0 4px 15px rgba(214, 181, 122, 0.15);
}

.formula-label input[type="radio"]:checked + .formula-card-inner .formula-title {
    color: var(--gold-primary);
}

.btn-small {
    width: auto;
    padding: 8px 12px;
    font-size: 0.8rem;
    margin-top: 0;
}

/* ==========================================================================
    BUTTONS & CTA
    ========================================================================== */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-main);
    box-shadow: 0 4px 15px rgba(214, 181, 122, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: shimmer 3s infinite;
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(214, 181, 122, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid rgba(214, 181, 122, 0.3);
    margin-top: 12px;
}

.btn-secondary:active {
    background: rgba(214, 181, 122, 0.1);
}

.btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: currentColor;
}

/* Sticky CTA on Mobile */
.sticky-cta-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 20px 24px;
    background: linear-gradient(to top, var(--bg-main) 70%, rgba(11,11,15,0));
    z-index: 100;
}

.sticky-cta-container .btn {
    max-width: 440px;
    margin: 0 auto;
    animation: pulseCTA 2.5s infinite;
}

/* ==========================================================================
    INFO & FOOTER
    ========================================================================== */
.info-section {
    padding: 10px 0;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.info-icon {
    color: var(--gold-primary);
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-text h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.info-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- LOGO & INSTAGRAM CARD --- */
.brand-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: block;
    border: 2px solid rgba(214, 181, 122, 0.3);
    background-color: #fff;
    box-shadow: 0 8px 24px rgba(214, 181, 122, 0.15);
    padding: 8px;
    animation: floatLogo 5s ease-in-out infinite;
}

.social-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    padding: 16px 20px;
    cursor: pointer;
}
.social-card:hover, .social-card:active {
    background: rgba(214, 181, 122, 0.08);
    border-color: var(--gold-primary);
}
.social-content {
    display: flex;
    align-items: center;
    gap: 14px;
}
.social-icon {
    color: var(--gold-primary);
    width: 28px;
    height: 28px;
}
.social-text h3 {
    color: var(--text-light);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 2px;
}
.social-text p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer {
    text-align: center;
    padding: 10px 0 30px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
    ANIMATIONS
    ========================================================================== */
@keyframes shimmer {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes swing {
    0% { transform: rotate(4deg); }
    100% { transform: rotate(-4deg); }
}

@keyframes pulseGlow {
    0% { opacity: 0.7; transform: translateX(-50%) scale(0.95); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; transform: scale(0.8); }
    50% { opacity: 0.6; transform: scale(1.2) rotate(15deg); }
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); box-shadow: 0 8px 24px rgba(214, 181, 122, 0.15); }
    50% { transform: translateY(-8px); box-shadow: 0 16px 32px rgba(214, 181, 122, 0.35); }
}

@keyframes pulseCTA {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 8px 20px rgba(214, 181, 122, 0.4); }
}

/* Desktop optimizations */
@media (min-width: 768px) {
    body { padding-bottom: 0; align-items: center; }
    .sticky-cta-container { display: none; }
    .desktop-cta { display: flex !important; }
    .container { padding: 40px 20px; }
}
