/* Styles personnalisés */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Transitions pour les cartes */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Amélioration des images de la galerie */
#gallery-grid img {
    will-change: transform;
}

/* Disposition galerie en grille responsive */
#gallery-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    #gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Zone tactile plus grande pour mobile */
@media (max-width: 640px) {
    #gallery-grid .relative {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    #gallery-grid img {
        touch-action: manipulation;
    }
}

/* Styles pour le lightbox */
#lightbox {
    backdrop-filter: blur(4px);
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
}

/* Amélioration du formulaire */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #b2562d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .text-8xl {
        font-size: 3rem;
    }
    
    .text-6xl {
        font-size: 2.5rem;
    }
}

/* Améliorations mobiles */
@media (max-width: 640px) {
    /* Navigation mobile améliorée */
    #navigation {
        padding: 0.5rem 0;
    }
    
    #navigation h3 {
        font-size: 1rem;
    }
    
    /* Section bienvenue mobile */
    #bienvenue h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
        white-space: normal !important;
        flex-direction: column;
    }
    
    #bienvenue .ampersand-style-white {
        font-size: 3rem !important;
        margin: 0.5rem 0;
    }
    
    #bienvenue p {
        font-size: 1rem !important;
        padding: 0 1rem;
    }
    
    /* Sections avec padding réduit */
    section {
        padding: 3rem 1rem !important;
    }
    
    /* Titres de section plus petits */
    section h2 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    /* Espacement réduit entre éléments */
    .space-y-20 > * + * {
        margin-top: 3rem !important;
    }
    
    .space-y-24 > * + * {
        margin-top: 3rem !important;
    }
    
    /* Images dans les sections histoire */
    #histoire .relative.h-96 {
        height: 250px !important;
    }
    
    /* Programme - colonnes empilées */
    #jour-j .grid {
        gap: 2rem !important;
    }
    
    /* Dress code - grille adaptée */
    #jour-j .flex-wrap {
        gap: 1rem !important;
    }
    
    #jour-j .flex-wrap > div {
        flex: 0 0 calc(50% - 0.5rem);
    }
    
    /* Formulaire iframe responsive */
    #confirmation iframe {
        min-height: 500px !important;
        height: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Amélioration du conteneur du formulaire */
    #confirmation .bg-white\/95 {
        overflow-x: hidden;
    }
    
    /* Lightbox mobile */
    #lightbox {
        padding: 0.5rem;
        touch-action: pan-y pinch-zoom;
    }
    
    #lightbox img {
        max-width: 95vw;
        max-height: 85vh;
        object-fit: contain;
        touch-action: pan-y pinch-zoom;
    }
    
    #close-lightbox {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.75rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    #prev-image,
    #next-image {
        padding: 1rem;
        min-width: 48px;
        min-height: 48px;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    #prev-image {
        left: 0.5rem;
    }
    
    #next-image {
        right: 0.5rem;
    }
    
    #lightbox-counter {
        bottom: 1rem;
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
    }
    
    /* Amélioration du scroll sur mobile */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Empêcher le zoom sur double tap pour les boutons */
    button {
        touch-action: manipulation;
    }
    
    /* Footer mobile */
    footer {
        padding: 3rem 1rem !important;
    }
    
    footer h3 {
        font-size: 1.75rem !important;
    }
}

/* Tablettes */
@media (min-width: 641px) and (max-width: 1024px) {
    section {
        padding: 4rem 2rem !important;
    }
    
    #bienvenue h1 {
        font-size: 4rem !important;
    }
    
    section h2 {
        font-size: 4rem !important;
    }
}

/* Smooth hover effects */
.hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Custom scrollbar (optionnel) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #b2562d;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d87a4d;
}

/* Style élégant pour le symbole & */
.ampersand-style {
    font-family: 'Playfair Display', 'EB Garamond', 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.05em;
    color: #1a1a1a;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.ampersand-style-white {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    font-style: italic;
    letter-spacing: -0.05em;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

/* Effet d'ombre + cœur qui bat pour le mot Cérémonie */
@keyframes shadow-pulse {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.5),
            0 0 20px rgba(255, 255, 255, 0.4),
            0 0 30px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(255, 255, 255, 0.2),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 0.7),
            0 0 30px rgba(255, 255, 255, 0.6),
            0 0 45px rgba(255, 255, 255, 0.5),
            0 0 60px rgba(255, 255, 255, 0.4),
            0 4px 8px rgba(0, 0, 0, 0.4);
    }
}

/* Cœur qui bat (sans tremblement) */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    20% {
        transform: scale(1.08);
    }
    35% {
        transform: scale(0.97);
    }
    55% {
        transform: scale(1.05);
    }
    75% {
        transform: scale(1);
    }
}

.ceremonie-highlight {
    display: inline-block;
    transform-origin: center;
    animation: shadow-pulse 8s ease-in-out infinite, heartbeat 5s ease-in-out infinite;
}

