/* ============================================
   Omar & Zineb - Page Émotionnelle Premium
   Style CSS - Design Élégant et Raffiné
   ============================================ */

/* Variables CSS pour la personnalisation facile */
:root {
    /* Palette principale - Tons chauds et élégants */
    --color-bg-primary: #1a1612;
    --color-bg-secondary: #241f1a;
    --color-bg-card: rgba(42, 36, 30, 0.6);
    
    /* Couleurs d'accent */
    --color-gold: #c9a86c;
    --color-gold-light: #d4ba8a;
    --color-gold-dark: #a08050;
    --color-cream: #f5f0e8;
    --color-cream-soft: #ebe5db;
    --color-warm-white: #faf8f5;
    
    /* Texte */
    --color-text-primary: #f5f0e8;
    --color-text-secondary: #c4bdb3;
    --color-text-muted: #8a837a;
    
    /* Effets */
    --glow-gold: rgba(201, 168, 108, 0.15);
    --glow-warm: rgba(255, 200, 150, 0.08);
    
    /* Typographie */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Raleway', 'Helvetica Neue', sans-serif;
    
    /* Espacements */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-primary);
    background: #1a1612 !important;
    background-color: #1a1612 !important;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    background: #1a1612 !important;
}

/* ============================================
   Effets de Fond
   ============================================ */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: floatGlow 20s ease-in-out infinite;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--glow-gold) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-warm) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 168, 108, 0.1) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

/* ============================================
   Conteneur Principal
   ============================================ */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
    min-height: 100vh;
}

@media (min-width: 768px) {
    .container {
        padding: var(--space-2xl) var(--space-lg);
    }
}

/* ============================================
   Animations d'Apparition
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    text-align: center;
    padding: var(--space-xl) 0;
    margin-bottom: var(--space-lg);
}

.hero-ornament {
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: var(--space-md);
    letter-spacing: 0.5em;
    opacity: 0.8;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 400;
    color: var(--color-cream);
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 30px rgba(201, 168, 108, 0.2);
}

.ampersand {
    font-style: italic;
    font-weight: 300;
    color: var(--color-gold);
    margin: 0 0.1em;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.hero-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    margin: 0 auto;
}

/* ============================================
   Photo Section
   ============================================ */
.photo-section {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.photo-frame {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-card);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(201, 168, 108, 0.1),
        inset 0 0 60px rgba(201, 168, 108, 0.03);
    transition: var(--transition-smooth);
}

.photo-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.3), transparent 50%, rgba(201, 168, 108, 0.1));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.photo-frame:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 35px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(201, 168, 108, 0.2),
        inset 0 0 80px rgba(201, 168, 108, 0.05);
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--color-text-muted);
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--color-gold);
    opacity: 0.4;
    margin-bottom: var(--space-sm);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.placeholder-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    letter-spacing: 0.1em;
}

/* ============================================
   Message Section
   ============================================ */
.message-section {
    background: var(--color-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.4),
        inset 0 0 80px rgba(201, 168, 108, 0.02);
    border: 1px solid rgba(201, 168, 108, 0.08);
}

@media (min-width: 768px) {
    .message-section {
        padding: var(--space-xl);
    }
}

.message-content {
    max-width: 650px;
    margin: 0 auto;
}

.message-content p {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
    text-align: justify;
    hyphens: auto;
}

@media (min-width: 768px) {
    .message-content p {
        font-size: 1.05rem;
        line-height: 2;
    }
}

.salutation {
    font-family: var(--font-heading) !important;
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    font-style: italic;
    color: var(--color-gold) !important;
    text-align: center !important;
    margin-bottom: var(--space-lg) !important;
    letter-spacing: 0.05em;
}

.prayer {
    font-style: italic;
    color: var(--color-cream-soft) !important;
    border-left: 2px solid var(--color-gold);
    padding-left: var(--space-md);
    margin: var(--space-lg) 0;
    background: rgba(201, 168, 108, 0.03);
    padding: var(--space-md);
    border-radius: 0 8px 8px 0;
}

.closing {
    text-align: right !important;
    margin-top: var(--space-xl) !important;
    margin-bottom: var(--space-xs) !important;
    color: var(--color-text-secondary) !important;
    font-style: italic;
}

.signature {
    font-family: var(--font-heading) !important;
    font-size: 1.3rem !important;
    font-weight: 500 !important;
    text-align: right !important;
    color: var(--color-gold) !important;
    letter-spacing: 0.05em;
    margin-bottom: 0 !important;
}

/* ============================================
   Audio Section
   ============================================ */
.audio-section {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.audio-button {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.15) 0%, rgba(201, 168, 108, 0.05) 100%);
    border: 1px solid rgba(201, 168, 108, 0.3);
    border-radius: 50px;
    color: var(--color-gold);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.audio-button:hover {
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.25) 0%, rgba(201, 168, 108, 0.1) 100%);
    border-color: rgba(201, 168, 108, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(201, 168, 108, 0.3);
}

.audio-button:active {
    transform: translateY(0);
}

.audio-button.playing {
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.3) 0%, rgba(201, 168, 108, 0.15) 100%);
    border-color: var(--color-gold);
}

.audio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.audio-icon svg {
    width: 20px;
    height: 20px;
}

.play-icon, .pause-icon {
    transition: var(--transition-fast);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(201, 168, 108, 0.1);
}

.footer-ornament {
    font-size: 1.5rem;
    color: var(--color-gold);
    opacity: 0.6;
    margin-bottom: var(--space-sm);
}

.footer-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.footer-year {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    opacity: 0.6;
    letter-spacing: 0.2em;
}

/* ============================================
   Scrollbar Personnalisée
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 108, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 108, 0.5);
}

/* ============================================
   Sélection de Texte
   ============================================ */
::selection {
    background: rgba(201, 168, 108, 0.3);
    color: var(--color-cream);
}

::-moz-selection {
    background: rgba(201, 168, 108, 0.3);
    color: var(--color-cream);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 480px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 3rem;
    }
    
    .hero-title {
        letter-spacing: 0.05em;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        letter-spacing: 0.2em;
    }
    
    .message-content p {
        font-size: 0.95rem;
        text-align: left;
    }
    
    .audio-button {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }
    
    .photo-frame {
        max-width: 100%;
    }
}

/* ============================================
   Animations Supplémentaires
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
