/* ==========================================================================
   1. VARIABLES & FONDATIONS
   ========================================================================== */
:root {
    --uk-blue: #22334e;
    --uk-red: #bb3c36;
    --glass-white: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   2. LAYOUT & BACKGROUND IMG EFFECT (HEADER & NAVIGATION)
   ========================================================================== */
.glass-header { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    border-bottom: 1px solid rgba(34, 51, 78, 0.05); 
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-zoom {
    animation: kenburns 20s ease-out forwards;
}

/* FIX : réduit le mouvement pour les utilisateurs qui le préfèrent */
@media (prefers-reduced-motion: reduce) {
    .hero-zoom {
        animation: none;
    }
    .reveal {
        transition: none !important;
    }
}

/* ==========================================================================
   3. SECTION HERO (VISUEL & LISIBILITÉ)
   ========================================================================== */

/* Gradient de protection sur l'image de fond */
.hero-gradient-pro {
    background: linear-gradient(
        90deg, 
        rgba(0, 0, 0, 0.5) 0%, 
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* FIX : gradient plus couvrant sur mobile pour lisibilité du titre */
@media (max-width: 640px) {
    .hero-gradient-pro {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.15) 0%,
            rgba(0, 0, 0, 0.55) 100%
        );
    }
}

/* Tags de destination & Sous-titre (Glassmorphism) */
.hero-tag {
    display: inline-flex;
    align-items: center;
    background: var(--glass-white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 18px;
    border-radius: 9999px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Logos de destination (Paris, Normandy, Scotland) */
.group:hover svg {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 8px rgba(187, 60, 54, 0.4));
}

/* Typographie & Contraste */
.red-pop {
    color: var(--uk-red) !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4) !important; 
    font-weight: 700 !important;
}

.text-pop {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   4. SECTION PROCESS — HOW IT WORKS
   ========================================================================== */

/* Pastille numérotée au-dessus de chaque étape */
.process-dot {
    position: relative;
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: var(--uk-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: background-color 0.4s ease, transform 0.3s ease;
}

.process-dot:hover,
.group:hover .process-dot {
    background-color: var(--uk-red);
    transform: scale(1.1);
}

.process-dot-label {
    color: white;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
}

/* Numéro décoratif en arrière-plan */
.process-bg-num {
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: rgba(34, 51, 78, 0.04);
    position: absolute;
    top: -2.5rem;
    left: -1rem;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

/* Ligne de connexion horizontale entre les pastilles (desktop uniquement) */
.process-line {
    position: absolute;
    /* Alignée verticalement au centre des pastilles (h-10 = 2.5rem, soit 1.25rem) */
    top: 1.25rem;
    /* Commence après la première pastille, finit avant la dernière */
    left: calc(2.5rem / 2 + (100% / 4) * 0);
    right: calc(2.5rem / 2 + (100% / 4) * 0);
    left: 3.5%;
    right: 3.5%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(34, 51, 78, 0.15) 10%,
        rgba(34, 51, 78, 0.15) 90%,
        transparent 100%
    );
    z-index: 0;
}

/* Connecteur vertical mobile (entre les étapes empilées) */
@media (max-width: 639px) {
    #process .grid > div:not(:last-child)::after {
        content: '';
        display: block;
        width: 1px;
        height: 2rem;
        background: linear-gradient(to bottom, rgba(34, 51, 78, 0.2), transparent);
        margin: 1.25rem 0 0 1.2rem;
    }
}

/* Délais d'animation manquants */
.delay-300 { transition-delay: 450ms; }
.delay-400 { transition-delay: 600ms; }

/* ==========================================================================
   5. COMPOSANTS SPÉCIFIQUES (FLIP CARDS)
   ========================================================================== */

/*
 * FIX MAJEUR : suppression du height: 450px fixe.
 * La hauteur est maintenant définie par aspect-ratio en CSS,
 * avec une valeur minimale sur mobile et une max sur desktop.
 */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    /* Mobile : hauteur raisonnable */
    height: 320px;
}

/* Tablette : on peut gagner un peu de place */
@media (min-width: 640px) {
    .flip-card {
        height: 380px;
    }
}

/* Desktop : hauteur pleine */
@media (min-width: 1024px) {
    .flip-card {
        height: 450px;
    }
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

/* Déclenchement du flip au hover (desktop) */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* FIX : sur tactile, permettre le flip au tap via focus */
.flip-card:focus-within .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1.5rem;
    overflow: hidden;
}

.flip-card-back {
    background-color: var(--uk-blue);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* ==========================================================================
   6. ANIMATIONS (REVEAL ON SCROLL)
   ========================================================================== */
.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1); 
}

.reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

/* FIX : tous les délais définis (delay-300 manquait) */
.delay-100 { transition-delay: 150ms; }
.delay-200 { transition-delay: 300ms; }
.delay-300 { transition-delay: 450ms; }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
    position: relative;
    z-index: 10;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* ==========================================================================
   8. FORM — textarea resize désactivé (déjà dans HTML, sécurité CSS)
   ========================================================================== */
textarea {
    resize: none;
}

/* Amélioration focus visible pour accessibilité clavier */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 2px solid var(--uk-red);
    outline-offset: 2px;
}