﻿/* ================================================================
   xrings.net — Phase 1 : Landing Page "Coming Soon"
   Feuille de style externe
   ================================================================ */

/* Reset moderne et base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ================================================================
   DESIGN TOKENS — Charte graphique xrings.net
   Fallbacks pour navigateurs sans CSS custom properties
   ================================================================ */
:root {
    /* Couleurs principales */
    --xr-orange: #cc6600;
    --xr-orange-light: #e07700;
    --xr-orange-dark: #b35900;
    --xr-orange-glow: rgba(204, 102, 0, 0.4);
    
    --xr-blue: #3399ff;
    --xr-blue-light: #66b3ff;
    --xr-blue-dark: #1a7fd9;
    --xr-blue-glow: rgba(51, 153, 255, 0.3);
    
    /* Neutres */
    --xr-gray-light: #cccccc;
    --xr-gray-dark: #333333;
    --xr-white: #ffffff;
    --xr-black: #000000;
    
    /* Surfaces */
    --xr-surface-dark: #0a0a0f;
    --xr-surface-card: rgba(10, 10, 15, 0.3);
    --xr-surface-glass: rgba(255, 255, 255, 0.03);
    --xr-border-subtle: rgba(255, 255, 255, 0.08);
    
    /* États */
    --xr-success: #22c55e;
    --xr-error: #ef4444;
    
    /* Typographie — Apple HIG inspirée */
    --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    --font-display: 'DM Sans', var(--font-system);
    --font-body: 'DM Sans', var(--font-system);
    
    /* Espacement — basé sur 8pt grid (Apple HIG) */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.5rem;   /* 24px */
    --space-6: 2rem;     /* 32px */
    --space-7: 2.5rem;   /* 40px */
    --space-8: 3rem;     /* 48px */
    --space-10: 4rem;    /* 64px */
    
    /* Rayons — Apple HIG continuous corners */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions — Apple HIG fluid motion */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-orange: 0 0 40px var(--xr-orange-glow);
    --shadow-glow-blue: 0 0 30px var(--xr-blue-glow);
    
    /* Z-index scale */
    --z-background: -1;
    --z-default: 1;
    --z-elevated: 10;
    --z-overlay: 100;
    --z-modal: 1000;
}

/* ================================================================
   BASE STYLES
   ================================================================ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background-color: #0a0a0f;
}

/* Fallback scroll-behavior */
@supports not (scroll-behavior: smooth) {
    html { scroll-behavior: auto; }
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.5;
    color: #ffffff;
    color: var(--xr-white);
    background-color: transparent;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow-x: hidden;
    
    /* Rendu typographique optimisé */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'kern' 1, 'liga' 1;
}

/* ================================================================
   BACKGROUND LAYER
   ================================================================ */
.xr-background {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-color: #0a0a0f;
    background-color: var(--xr-surface-dark);
    overflow: hidden;
}

.xr-background__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -o-object-position: center;
    object-position: center;
    opacity: 0.7;
    -webkit-filter: saturate(1.1);
    filter: saturate(1.1);
}

/* Overlay gradient pour lisibilité du texte */
.xr-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(204, 102, 0, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, 
            rgba(10, 10, 15, 0.5) 0%, 
            rgba(10, 10, 15, 0.2) 30%, 
            rgba(10, 10, 15, 0.2) 70%, 
            rgba(10, 10, 15, 0.6) 100%
        );
    pointer-events: none;
}

/* ================================================================
   MAIN CONTAINER — Apple HIG Safe Areas
   ================================================================ */
.xr-main {
    position: relative;
    z-index: 2;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: var(--space-5) var(--space-4) var(--space-4);
    padding-top: max(env(safe-area-inset-top, 24px), var(--space-5));
    padding-right: max(env(safe-area-inset-right, 16px), var(--space-4));
    padding-bottom: max(env(safe-area-inset-bottom, 16px), var(--space-4));
    padding-left: max(env(safe-area-inset-left, 16px), var(--space-4));
}

.xr-content {
    width: 100%;
    max-width: 540px;
    text-align: center;
}

/* ================================================================
   ANIMATIONS — Entrée orchestrée (Apple HIG Motion)
   ================================================================ */
@-webkit-keyframes xr-fade-up {
    from {
        opacity: 0;
        -webkit-transform: translateY(24px);
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes xr-fade-up {
    from {
        opacity: 0;
        -webkit-transform: translateY(24px);
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@-webkit-keyframes xr-glow-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes xr-glow-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.xr-animate {
    -webkit-animation: xr-fade-up 0.8s var(--ease-out) both;
    animation: xr-fade-up 0.8s var(--ease-out) both;
}

.xr-animate--delay-1 { -webkit-animation-delay: 100ms; animation-delay: 100ms; }
.xr-animate--delay-2 { -webkit-animation-delay: 200ms; animation-delay: 200ms; }
.xr-animate--delay-3 { -webkit-animation-delay: 300ms; animation-delay: 300ms; }
.xr-animate--delay-4 { -webkit-animation-delay: 400ms; animation-delay: 400ms; }
.xr-animate--delay-5 { -webkit-animation-delay: 500ms; animation-delay: 500ms; }

/* ================================================================
   BRAND / LOGO
   ================================================================ */
.xr-brand {
    margin-bottom: var(--space-5);
}

.xr-brand__name {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #cc6600;
    color: var(--xr-orange);
    text-shadow: 0 0 60px rgba(204, 102, 0, 0.5);
    line-height: 1.1;
    
    /* Animation glow subtile */
    -webkit-animation: xr-glow-pulse 4s ease-in-out infinite;
    animation: xr-glow-pulse 4s ease-in-out infinite;
}

/* ================================================================
   TAGLINE
   ================================================================ */
.xr-tagline {
    margin-bottom: var(--space-4);
}

.xr-tagline__text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 600;
    color: #3399ff;
    color: var(--xr-blue);
    letter-spacing: -0.01em;
    text-shadow: 0 0 30px rgba(51, 153, 255, 0.4);
}

/* ================================================================
   DESCRIPTION
   ================================================================ */
.xr-description {
    margin-bottom: var(--space-5);
}

.xr-description__text {
    font-size: 1.125rem;
    font-size: clamp(1.0625rem, 3vw, 1.25rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 1);
    line-height: 1.7;
    max-width: 460px;
    margin: 0 auto var(--space-4) auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.xr-description__text:last-child {
    margin-bottom: 0;
}

/* ================================================================
   NEWSLETTER CARD — Apple HIG Glass Effect
   ================================================================ */
.xr-card {
    background: rgba(10, 10, 15, 0.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

/* Fallback pour navigateurs sans backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
    .xr-card {
        background: rgba(10, 10, 15, 0.95);
    }
}

.xr-card__title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--xr-white);
    margin-bottom: var(--space-2);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.xr-card__subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ================================================================
   FORM — Apple HIG Controls
   ================================================================ */
.xr-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: var(--space-3);
}

/* Fallback pour gap */
@supports not (gap: 12px) {
    .xr-form > * + * {
        margin-top: var(--space-3);
    }
}

.xr-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: 1rem;
    font-size: max(16px, 1rem); /* Empêche zoom iOS */
    font-weight: 400;
    color: var(--xr-gray-dark);
    background: var(--xr-white);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    outline: none;
    -webkit-transition: border-color var(--duration-fast) var(--ease-out), 
                        -webkit-box-shadow var(--duration-fast) var(--ease-out);
    transition: border-color var(--duration-fast) var(--ease-out), 
                box-shadow var(--duration-fast) var(--ease-out);
    
    /* Supprime styles iOS par défaut */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.xr-input::-webkit-input-placeholder {
    color: #999;
}

.xr-input::-moz-placeholder {
    color: #999;
}

.xr-input:-ms-input-placeholder {
    color: #999;
}

.xr-input::placeholder {
    color: #999;
}

.xr-input:focus {
    border-color: var(--xr-orange);
    -webkit-box-shadow: 0 0 0 4px rgba(204, 102, 0, 0.15);
    box-shadow: 0 0 0 4px rgba(204, 102, 0, 0.15);
}

/* Button — Apple HIG Filled Style */
.xr-button {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--xr-white);
    background: var(--xr-orange);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    -webkit-transition: background-color var(--duration-fast) var(--ease-out),
                        -webkit-transform var(--duration-fast) var(--ease-out);
    transition: background-color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    
    /* Supprime styles iOS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.xr-button:hover {
    background: var(--xr-orange-light);
    -webkit-transform: translateY(-1px);
    -ms-transform: translateY(-1px);
    transform: translateY(-1px);
}

.xr-button:active {
    -webkit-transform: translateY(0) scale(0.98);
    -ms-transform: translateY(0) scale(0.98);
    transform: translateY(0) scale(0.98);
}

.xr-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    -webkit-transform: none;
    -ms-transform: none;
    transform: none;
}

/* Form Message */
.xr-message {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
}

.xr-message--success {
    display: block;
    background: rgba(51, 153, 255, 0.15);
    border: 1px solid var(--xr-blue);
    color: var(--xr-blue);
}

.xr-message--error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--xr-error);
    color: var(--xr-error);
}

/* ================================================================
   FEATURES LIST — Apple HIG Layout
   ================================================================ */
.xr-features {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: var(--space-3);
}

/* Fallback gap */
@supports not (gap: 16px) {
    .xr-features > * + * {
        margin-top: var(--space-4);
    }
}

.xr-feature {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: var(--space-3);
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Fallback gap feature */
@supports not (gap: 12px) {
    .xr-feature__icon {
        margin-right: var(--space-3);
    }
}

.xr-feature__icon {
    width: 22px;
    height: 22px;
    color: var(--xr-orange);
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

/* ================================================================
   FOOTER
   ================================================================ */
.xr-footer {
    position: relative;
    z-index: 2;
    padding: var(--space-5) var(--space-4);
    padding-bottom: max(env(safe-area-inset-bottom, 24px), var(--space-5));
    text-align: center;
}

.xr-footer__text {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.01em;
}

.xr-footer__link {
    color: var(--xr-orange);
    text-decoration: none;
    -webkit-transition: color var(--duration-fast) var(--ease-out);
    transition: color var(--duration-fast) var(--ease-out);
}

.xr-footer__link:hover {
    color: var(--xr-orange-light);
}

/* ================================================================
   ACCESSIBILITY
   ================================================================ */
.xr-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Focus visible — Apple HIG */
:focus {
    outline: 2px solid var(--xr-orange);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--xr-orange);
    outline-offset: 2px;
}

/* Skip link */
.xr-skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    padding: var(--space-3) var(--space-5);
    background: var(--xr-orange);
    color: var(--xr-white);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: var(--z-modal);
    -webkit-transition: top var(--duration-fast) var(--ease-out);
    transition: top var(--duration-fast) var(--ease-out);
}

.xr-skip-link:focus {
    top: var(--space-4);
}

/* ================================================================
   RESPONSIVE — 3 BREAKPOINTS
   Mobile first: < 480px (default)
   Tablet: 480px - 768px
   Desktop: > 768px
   ================================================================ */

/* TABLET (480px+) */
@media (min-width: 480px) {
    .xr-main {
        padding: var(--space-6) var(--space-5);
    }
    
    .xr-content {
        max-width: 560px;
    }
    
    .xr-card {
        padding: var(--space-6) var(--space-7);
    }
    
    .xr-form {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
    }
    
    .xr-input {
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
    }
    
    .xr-button {
        width: auto;
        white-space: nowrap;
    }
    
    .xr-features {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
}

/* DESKTOP (768px+) */
@media (min-width: 768px) {
    .xr-main {
        padding: var(--space-5) var(--space-6);
    }
    
    .xr-content {
        max-width: 620px;
    }
    
    .xr-brand {
        margin-bottom: var(--space-5);
    }
    
    .xr-description {
        margin-bottom: var(--space-5);
    }
    
    .xr-card {
        padding: var(--space-5) var(--space-6);
    }
    
    .xr-features {
        gap: var(--space-5);
    }
}

/* LARGE DESKTOP (1024px+) */
@media (min-width: 1024px) {
    .xr-content {
        max-width: 680px;
    }
}

/* ================================================================
   REDUCED MOTION — Accessibilité
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        -webkit-animation-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        -webkit-animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
        -webkit-transition-duration: 0.01ms !important;
        -o-transition-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    .xr-brand__name {
        -webkit-animation: none;
        animation: none;
    }
}

/* ================================================================
   HIGH CONTRAST MODE — Accessibilité
   ================================================================ */
@media (prefers-contrast: high) {
    .xr-input {
        border: 2px solid var(--xr-gray-dark);
    }
    
    .xr-card {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .xr-feature {
        color: var(--xr-white);
    }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
    .xr-background {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .xr-brand__name {
        color: #cc6600;
        text-shadow: none;
        -webkit-animation: none;
        animation: none;
    }
    
    .xr-tagline__text {
        color: #1a7fd9;
        text-shadow: none;
    }
    
    .xr-card {
        background: #f5f5f5;
        border: 1px solid #ccc;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}
