/* Réinitialisation générale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Votre image de fond bg.jpg */
    background-image: url('../imgs/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 1.5rem;
    overflow-x: hidden; /* Évite les barres de défilement pendant les animations */
}

/* Conteneur principal (Logo + Titre) */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: auto;
}

/* Zone du Logo - Animation d'entrée sophistiquée */
.logo-box {
    max-width: 420px;
    width: 100%;
    margin-bottom: 2.5rem;
    position: relative;
    /* Glissement doux vers le haut au chargement */
    opacity: 0;
    animation: entranceFadeSlideUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.logo-box img {
    width: 100%;
    height: auto; 
    display: block;
    backface-visibility: hidden; /* Améliore la netteté pendant les rotations/zooms */
    
    /* ANIMATION CONTINUE DOUCE (RESPIRATION) */
    /* Elle démarre APRÈS l'animation d'entrée de 1.4s */
    animation: breathingLogo 8s ease-in-out infinite;
    animation-delay: 1.4s; 
}

/* Interaction subtile au survol du logo */
.logo-box:hover img {
    transform: translateY(-5px) rotate(1deg);
    filter: drop-shadow(0 15px 15px rgba(92, 39, 39, 0.12));
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Titre H1 avec animation fluide */
h1 {
    font-size: 2.4rem;
    color: #5c2727; /* Teinte bordeaux accordée au logo */
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
    opacity: 0;
    /* Glissement vers le haut et apparition (décalé après le logo) */
    animation: fadeInUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.6s;
}

.sub-title {
    font-size: 2rem;
    font-weight: 400;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Bloc de contact en bas de page */
.contact-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1.5rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(92, 39, 39, 0.06);
    text-align: center;
    opacity: 0;
    /* Apparition finale */
    animation: fadeIn 1.2s ease-out forwards;
    animation-delay: 1.2s;
}

.contact-card h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8c4343;
    margin-bottom: 0.6rem;
}

.contact-card .name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.2rem;
}

.contact-card .phone {
    font-size: 1.1rem;
    color: #5c2727;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-card .phone:hover {
    color: #a65353;
}

/* --- TOUTES LES ANIMATIONS CSS (Keyframes) --- */

/* Entrée douce + Glissement (Logo) */
@keyframes entranceFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Respiration continue subtile (Logo - après chargement) */
@keyframes breathingLogo {
    0%, 100% {
        transform: scale(1);
        opacity: 0.96;
        filter: drop-shadow(0 5px 10px rgba(92, 39, 39, 0.05));
    }
    50% {
        transform: scale(1.025);
        opacity: 1;
        filter: drop-shadow(0 10px 15px rgba(92, 39, 39, 0.08));
    }
}

/* Apparition classique + Glissement (Titre) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apparition simple (Contact) */
@keyframes fadeIn {
    to { opacity: 1; }
}

/* Adaptation Écrans Mobiles */
@media (max-width: 600px) {
    h1 { font-size: 1.6rem; }
    .sub-title { font-size: 1.3rem; }
    .logo-box { max-width: 300px; }
    .contact-card {
        padding: 1.2rem 2rem;
        width: 100%;
        max-width: 340px;
    }
}