/* ============================================================
   DAFA — style.css
   Essam Libert · UX Designer · 2026
   ============================================================ */


/* ============================================================
   VARIABLES
   ============================================================ */

:root {
    --text-dark: #1d1d1f;
    --text-gray: #86868b;
    --bg-white: #ffffff;
    --bg-light-apple: #f5f5f7;
    --accent: #0071e3;
    --bg-dark-apple: #1d1d1f;
}


/* ============================================================
   BASE
   ============================================================ */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body.apple-theme {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ============================================================
   UTILITAIRES TYPOGRAPHIE
   ============================================================ */

.tracking-tight {
    letter-spacing: -0.03em;
}

.tracking-widest {
    letter-spacing: 0.12em;
}

.text-gradient {
    background: linear-gradient(135deg, #0071e3 0%, #5ac8fa 30%, #34c759 60%, #0071e3 100%);
    background-size: 300% 300%;
    animation: gradient-shift 5s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gray {
    color: var(--text-gray);
}

/* Surcharge Bootstrap : ratio de contraste WCAG AA (4.5:1 minimum) */
.text-muted {
    color: #5a6268 !important;
}

/* Texte blanc atténué sur fonds sombres ou colorés — contraste garanti */
.text-white-75 {
    color: rgba(255, 255, 255, 0.88) !important;
}


/* ============================================================
   UTILITAIRES LAYOUT
   ============================================================ */

.max-width-800 {
    max-width: 800px;
}

.full-width-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}


/* ============================================================
   UTILITAIRES OMBRE
   ============================================================ */

.shadow-2xl {
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25) !important;
}


/* ============================================================
   COULEURS DE FOND PERSONNALISÉES
   ============================================================ */

.bg-light-apple {
    background-color: var(--bg-light-apple) !important;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.glass-nav {
    background-color: rgba(29, 29, 31, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


/* ============================================================
   HERO
   ============================================================ */

.hero-section {
    min-height: 80vh;
}


/* ============================================================
   BENTO CARDS
   ============================================================ */

.bento-box {
    border-radius: 32px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 32px 64px rgba(0, 113, 227, 0.14) !important;
}


/* ============================================================
   FORMULAIRE
   ============================================================ */

.apple-input {
    border: 1px solid #d2d2d7 !important;
    background-color: var(--bg-light-apple) !important;
    border-radius: 16px !important;
    height: auto !important;
    padding: 1.5rem 1rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apple-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15) !important;
    background-color: var(--bg-white) !important;
}

/* Fieldset pour groupes radio — reset visuel, structure accessible */
fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

fieldset legend {
    float: none;
    width: auto;
    padding: 0;
    margin-bottom: 0.75rem;
    font-size: inherit;
    line-height: inherit;
}


/* ============================================================
   CONTACT CARDS
   ============================================================ */

.contact-card-hover {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.contact-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10) !important;
}


/* ============================================================
   BOUTONS
   ============================================================ */

.btn-apple {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-apple:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}


/* ============================================================
   PHOTO DE PROFIL
   ============================================================ */

.profile-image-wrapper {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #111;
    margin: 0 auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ============================================================
   PROTOTYPE FIGMA — PHONE FRAME
   ============================================================ */

.phone-frame-container {
    max-width: 420px;
    background: #000;
    border: 14px solid #1a1a1a;
    border-radius: 55px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.phone-iframe {
    width: 100%;
    height: 800px;
    border: none;
    display: block;
}


/* ============================================================
   SECTIONS SPÉCIALES
   ============================================================ */

.waitlist-section {
    background-color: var(--bg-dark-apple);
    width: 100%;
    padding: 80px 0;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-14px); }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hero stagger delays */
.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.18s; }
.anim-delay-3 { animation-delay: 0.32s; }
.anim-delay-4 { animation-delay: 0.48s; }
.anim-delay-5 { animation-delay: 0.65s; }
.anim-delay-6 { animation-delay: 0.80s; }

/* Floating element */
.float-anim {
    animation: float 5s ease-in-out infinite;
}

/* Scroll progress bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0071e3, #5ac8fa, #34c759);
    z-index: 99999;
    width: 0%;
    transition: width 0.12s ease-out;
    pointer-events: none;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.72s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.18s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.42s; }


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
    }

    .phone-frame-container {
        max-width: 320px;
    }

    .phone-iframe {
        height: 620px;
    }

    .bento-box {
        border-radius: 24px;
    }

    .profile-image-wrapper {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 575.98px) {
    .tracking-tight {
        letter-spacing: -0.02em;
    }

    .phone-frame-container {
        max-width: 280px;
        border-width: 10px;
        border-radius: 44px;
    }

    .phone-iframe {
        height: 540px;
    }

    .max-width-800 {
        max-width: 100%;
    }
}
/* Accessibilité : Désactivation des animations pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .float-anim,
    .text-gradient,
    .bento-box,
    .reveal {
        animation: none !important;
        transform: none !important;
        transition: none !important;
        opacity: 1 !important;
    }
    #scroll-progress { display: none; }
}