/* =================================
   POLICES PERSONNALISÉES
   ================================= */
/* Police "Qwerty Ability" téléchargée depuis dafont.com
   Utilisée spécifiquement pour les noms "Alice", "François" et "A & F" */
@font-face {
    font-family: 'Qwerty Ability';
    src: url('../fonts/Qwerty Ability.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Police Garamond personnalisée - Version normale */
@font-face {
    font-family: 'Garamond';
    src: url('../fonts/GARA.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Police Garamond personnalisée - Version gras */
@font-face {
    font-family: 'Garamond';
    src: url('../fonts/GARABD.TTF') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Police Garamond personnalisée - Version italique */
@font-face {
    font-family: 'Garamond';
    src: url('../fonts/GARAIT.TTF') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Variables CSS pour une maintenance plus facile */
:root {
    /* POLICE UNIQUE POUR TOUT LE SITE : Garamond personnalisée */
    --primary-font: 'Garamond', serif;
    --serif-font: 'Garamond', serif;
    /* POLICE POUR LES NOMS ALICE & FRANÇOIS + A & F : Qwerty Ability uniquement */
    --couples-names-font: 'Qwerty Ability', sans-serif;
    
    /* NOUVELLE PALETTE HARMONISÉE AUTOUR DU VERT #52796F */
    --primary-green: #52796F;
    --primary-green-light: #6B9A87;
    --primary-green-lighter: #8AB5A5;
    --primary-green-lightest: #B8D4C9;
    --primary-green-dark: #3E5B53;
    --primary-green-darker: #2A3C37;
    
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
    --color-stone-400: #a8a29e;
    --color-stone-600: #78716c;
    --color-stone-700: #57534e;
    --color-stone-800: #44403c;
    
    /* Remplacement des couleurs roses/amber par des tons verts harmonieux */
    --accent-green-200: #B8D4C9;
    --accent-green-300: #8AB5A5;
    --accent-green-400: #6B9A87;
    --accent-warm: #7A8471; /* Vert-beige pour remplacer l'amber */
    
    --shadow-soft: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --transition-default: 0.3s ease;
    --transition-smooth: 1s ease-out;
    
    --border-radius-card: 1rem;
    --spacing-section: 6rem;
}

/* Reset et base */
* {
    transition: color var(--transition-default), 
                background-color var(--transition-default), 
                border-color var(--transition-default), 
                transform var(--transition-default);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--primary-font);
    font-weight: 300;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* Arrière-plan amélioré */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(184, 212, 201, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(138, 181, 165, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(107, 154, 135, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Typographie */
.font-serif {
    font-family: var(--serif-font);
}

/* =================================
   CLASSE POUR LES NOMS DES MARIÉS
   ================================= */
/* Cette classe applique la police "Qwerty Ability" aux noms Alice et François */
.font-couples-names {
    font-family: var(--couples-names-font); /* = 'Qwerty Ability', sans-serif */
}

/* Container pour le faire-part qui définit la taille de référence */
.faire-part-container {
    /* La largeur de ce conteneur définit la taille de référence pour le texte */
    width: min(90vw, 64rem); /* max-w-4xl équivaut à 64rem */
}

/* Taille responsive fluide pour les noms dans le faire-part - basée sur la largeur du conteneur */
.couples-names-responsive {
    /* Agrandissement jusqu'à la séparation navbar (A&F à gauche, menu à droite) */
    font-size: clamp(2.5rem, 8vw, 4.8rem); /* Max augmenté à 4.8rem pour arrêter au bon breakpoint */
    line-height: 1.1;
    /* Assure que le texte ne déborde jamais */
    max-width: 100%;
    text-align: center;
    word-break: keep-all;
}

/* Taille responsive pour le séparateur "&" */
.separator-responsive {
    font-size: clamp(1.5rem, 4vw, 2.4rem); /* Max augmenté à 2.4rem pour sync avec les noms */
}


p {
    line-height: 1.7;
}

/* Navigation */
.nav-link {
    position: relative;
    padding: 8px 0;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: #52796F !important;
    transition: color var(--transition-default);
    text-decoration: none;
    outline: none;
}

.nav-link:hover {
    color: #52796F !important;
    opacity: 0.8;
}

.nav-link:focus {
    outline: none;
    box-shadow: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-green-300), transparent);
    transition: width 0.4s ease, left 0.4s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.nav-link.active::after {
    width: 100% !important;
    left: 0 !important;
    background: linear-gradient(90deg, transparent, var(--accent-green-400), transparent);
}

.nav-link.active {
    color: #52796F !important;
    font-weight: 500;
}

/* Menu mobile */
#mobile-menu {
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.show {
    max-height: 300px;
    opacity: 1;
}

/* Cartes uniformes - Largeur identique et comportement uniforme */
.uniform-card {
    /* Largeur fixe pour toutes les cards - identique sur mobile */
    width: 320px; /* Largeur fixe pour mobile */
    max-width: 90vw; /* Ne pas déborder de l'écran */
    
    /* Hauteur uniforme */
    min-height: 350px;
    
    /* Espacement et layout */
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    
    /* Style glassmorphism */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-soft);
    
    /* Transition uniforme */
    transition: all var(--transition-default);
}

.uniform-card:hover {
    background: rgba(255, 255, 255, 0.75) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-medium) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
}

/* Responsive uniforme pour toutes les cards */
@media (min-width: 640px) {
    .uniform-card {
        width: 400px; /* Largeur fixe pour sm */
        max-width: none; /* Retire la limite max-width */
        min-height: 400px;
        padding: 3rem;
    }
}

@media (min-width: 768px) {
    .uniform-card {
        width: 500px; /* Largeur fixe pour md */
        min-height: 450px;
        padding: 4rem;
    }
}

@media (min-width: 1024px) {
    .uniform-card {
        width: 600px; /* Largeur fixe pour lg */
        min-height: 450px;
    }
}

/* Animations simplifiées */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(-1deg); }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

/* Classes d'animation */
.animate-float {
    animation: float 6s ease-in-out infinite;
    will-change: transform;
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
    will-change: transform;
}

.animate-float-reverse {
    animation: float-reverse 7s ease-in-out infinite;
    will-change: transform;
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

/* Effet fade-in au scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-animate {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Boutons */
button {
    transition: all var(--transition-default);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

/* Gradients animés */
.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

/* États de focus pour l'accessibilité */
a:focus,
button:focus {
    outline: 2px solid rgba(168, 162, 158, 0.4);
    outline-offset: 2px;
    border-radius: 2px;
}

.nav-link:focus-visible {
    outline: 2px solid rgba(184, 212, 201, 0.6);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Sélection de texte */
::selection {
    background: rgba(184, 212, 201, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(184, 212, 201, 0.3);
    color: inherit;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-stone-400), var(--accent-green-300));
    border-radius: 4px;
    opacity: 0.3;
}

::-webkit-scrollbar-thumb:hover {
    opacity: 0.5;
}

/* SVG et IMG animations et hover des icônes */
svg,
img {
    transition: transform var(--transition-default), color var(--transition-default);
}

/* Hover sur le conteneur d'icône spécifiquement */
.icon-container:hover svg,
.icon-container:hover img {
    transform: scale(1.1);
}

/* Hover sur le conteneur d'icône lui-même */
.icon-container {
    transition: transform var(--transition-default);
    cursor: pointer;
}

.icon-container:hover {
    transform: scale(1.05);
}

/* Container */
.container {
    max-width: 1200px;
}

/* Mobile First Responsive Design */
/* Base styles (mobile) */
section {
    min-height: auto;
    padding-top: 6rem; /* Réduit l'espace après la navbar */
    padding-bottom: 4rem;
}

/* Section d'accueil - plus d'espace pour le design */
section#accueil {
    padding-top: 8rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }

/* Small screens (sm) */
@media (min-width: 640px) {
    section {
        padding-top: 6rem;
        padding-bottom: 5rem;
    }
    
    section#accueil {
        padding-top: 8rem;
    }
    
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
}

/* Medium screens (md) */
@media (min-width: 768px) {
    section {
        min-height: 100vh;
        padding-top: 5rem; /* Réduit encore l'espace */
        padding-bottom: var(--spacing-section);
    }
    
    /* Section d'accueil - garde plus d'espace */
    section#accueil {
        padding-top: 6rem;
    }
    
    h1 { font-size: 4rem; }
    h2 { font-size: 2.5rem; }
}

/* Large screens (lg) */
@media (min-width: 1024px) {
    h1 { font-size: 5rem; }
    h2 { font-size: 3rem; }
}

/* Extra large screens (xl) */
@media (min-width: 1280px) {
    h1 { font-size: 5.5rem; }
}

/* Accessibilité - Motion réduit */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-float,
    .animate-float-slow,
    .animate-float-reverse,
    .animate-bounce-slow {
        animation: none;
    }
}

/* Print styles */
@media print {
    nav { display: none; }
    
    section {
        page-break-after: always;
        min-height: auto;
    }
    
    .uniform-card {
        background: white;
        border: 1px solid #e5e7eb;
        min-height: auto;
        box-shadow: none;
    }
    
    body::before { display: none; }
}

/* États de chargement */
.loaded {
    /* Styles pour quand la page est complètement chargée */
}

/* Optimisations de performance */
.backdrop-blur-sm,
.backdrop-blur-md {
    will-change: backdrop-filter;
}


/* =================================
   AJUSTEMENTS SPÉCIFIQUES MOBILE 
   ================================= */
/* Réduction de l'espacement entre Alice, &, et François sur mobile pour qu'ils restent dans le cadre blanc */
@media (max-width: 640px) {
    /* Réduction des marges entre les noms pour les mobiles */
    .couples-names-responsive {
        margin-bottom: 0 !important; /* Supprime complètement la marge mb-1 sur mobile */
    }
    
    /* Espacement réduit pour le séparateur & sur mobile */
    .flex.items-center.justify-center.mb-1 {
        margin-bottom: 0 !important; /* Supprime la marge du séparateur sur mobile */
        margin-top: -0.125rem; /* Légère remontée pour compenser */
    }
    
    /* Ajustement spécifique du line-height sur très petits écrans */
    @media (max-width: 480px) {
        .couples-names-responsive {
            line-height: 1.05; /* Line-height encore plus serré sur très petits écrans */
        }
    }
}
