@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@300;400;500;600;700&display=swap');

/* ========================================
   VARIABLES CSS MODERNES
   ======================================== */
:root {
    /* Palette de verts modernes - plus clairs et frais */
    --primary-green: #7d9b6d;
    --primary-green-light: #9bb88a;
    --primary-green-lighter: #b8d4a8;
    --primary-green-dark: #5f7a52;
    --primary-green-glow: rgba(125, 155, 109, 0.3);

    /* Couleurs neutres */
    --bg-light: #f8faf7;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --text-dark: #2d3a2a;
    --text-medium: #4a5a46;
    --text-light: #6b7b67;

    /* Ombres modernes */
    --shadow-sm: 0 2px 8px rgba(45, 58, 42, 0.06);
    --shadow-md: 0 4px 20px rgba(45, 58, 42, 0.08);
    --shadow-lg: 0 8px 40px rgba(45, 58, 42, 0.12);
    --shadow-glow: 0 0 30px rgba(125, 155, 109, 0.15);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Border radius moderne */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* ========================================
   RESET ET BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Urbanist', sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, #eef3ec 100%);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   HEADER MODERNE
   ======================================== */
header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: #ffffff;
    padding: 24px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* ========================================
   LANGUAGE SWITCHER MODERNE
   ======================================== */
.lang-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 4px;
    z-index: 10;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-medium);
}

.lang-btn:hover {
    background: rgba(125, 155, 109, 0.1);
    color: var(--primary-green-dark);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main {
    flex: 1;
    padding: 32px 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
   WELCOME CONTAINER
   ======================================== */
.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* assure le centrage vertical si nécessaire */
    margin: 24px auto;       /* auto à gauche et droite */
    padding: 40px;
    width: 90%;              /* ou une valeur fixe comme 1000px max */
    max-width: 1000px;       /* pour éviter qu'elle soit trop large */
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}


.welcome-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green-light), var(--primary-green), var(--primary-green-light));
}

.welcome-text {
    text-align: center;
    margin-bottom: 24px;
}

.welcome-text p {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   PHOTO ACCUEIL
   ======================================== */
.photo-accueil {
    display: flex;
    justify-content: center;
    width: 100%;
}

.photo-accueil img {
    width: 100%;
    max-width: 1000px;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
}

.photo-accueil img:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* ========================================
   BOUTONS MODERNES
   ======================================== */
.button-location, .button-services {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    text-decoration: none;
    transition: var(--transition-smooth);
    margin: 16px 8px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.button-location::before, .button-services::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: var(--transition-smooth);
}

.button-location:hover, .button-services:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.button-location:hover::before, .button-services:hover::before {
    left: 100%;
}

.button-location:active, .button-services:active {
    transform: translateY(-1px);
}

.location-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* ========================================
   SECTIONS
   ======================================== */
section {
    background: var(--bg-card);
    margin: 32px auto;
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: none;
    width: 90%;
    max-width: 900px;
    position: relative;
    transition: var(--transition-smooth);
}

section:hover {
    box-shadow: var(--shadow-lg);
}

.section-icon {
    display: block;
    margin: 0 auto 16px;
    width: 56px;
    height: 56px;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-green-lighter) 0%, var(--primary-green-light) 100%);
    border-radius: var(--radius-md);
}

/* ========================================
   DIVIDERS
   ======================================== */
.story-divider {
    width: 60%;
    max-width: 400px;
    margin: 40px auto;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-green-light), transparent);
}

/* ========================================
   TYPOGRAPHIE
   ======================================== */
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-green-dark);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-green);
}

/* ========================================
   LOGO
   ======================================== */
.logo img {
    max-width: 140px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.logo img:hover {
    transform: scale(1.05);
}

/* ========================================
   BOUTONS CONTACT
   ======================================== */
.button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.button-container2 {
    display: flex;
    justify-content: center;
    margin: 24px 0;
    gap: 16px;
    flex-wrap: wrap;
}

.button-container3 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.button-tel, .button-mess {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.button-tel:hover, .button-mess:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.phone-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

/* ========================================
   SOCIAL ICONS
   ======================================== */
.social-icon {
    width: 44px;
    height: 44px;
    margin: 0 8px;
    transition: var(--transition-bounce);
    border-radius: var(--radius-sm);
    padding: 8px;
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.1);
}

/* ========================================
   LOCALISATION
   ======================================== */
.localisation-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.localisation-text {
    flex: 1;
    text-align: left;
}

.localisation-text p {
    color: var(--text-medium);
    line-height: 1.8;
}

/* ========================================
   FOOTER MODERNE
   ======================================== */
footer {
    text-align: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, #4a6340 100%);
    color: #ffffff;
    position: relative;
    width: 100%;
    margin-top: auto;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

footer p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========================================
   LOADER MODERNE
   ======================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-light) 0%, #eef3ec 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.bar {
    display: inline-block;
    width: 8px;
    height: 48px;
    background: linear-gradient(180deg, var(--primary-green-light) 0%, var(--primary-green) 100%);
    border-radius: 100px;
    animation: pulse 1.2s ease-in-out infinite;
}

.bar:nth-child(2) {
    height: 64px;
    margin: 0 8px;
    animation-delay: 0.2s;
}

.bar:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        transform: scaleY(1);
        opacity: 0.7;
    }
    50% {
        transform: scaleY(1.4);
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    header {
        padding: 20px 16px;
    }

    .lang-switcher {
        position: relative;
        top: auto;
        right: auto;
        margin: 16px auto 0;
        justify-content: center;
    }

    .welcome-container {
        padding: 24px 16px;
        width: 95%;
        margin: 16px auto; /* toujours centré */
    }
}

    .welcome-text p {
        font-size: 1rem;
    }

    .button-container {
        flex-direction: column;
        align-items: stretch;
    }

    .button-tel, .button-mess {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .photo-accueil img {
        width: 100%;
        height: 250px;
        border-radius: var(--radius-lg);
    }

    section {
        padding: 24px 20px;
        width: 95%;
        margin: 24px auto;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .story-divider {
        width: 80%;
    }

    .localisation-container {
        flex-direction: column;
        align-items: center;
    }

    .localisation-text {
        margin-right: 0;
        text-align: center;
        margin-bottom: 16px;
    }

    .button-location, .button-services {
        width: 100%;
        max-width: 300px;
        padding: 14px 24px;
    }

    main {
        padding: 24px 16px;
    }

/* ========================================
   ANIMATIONS SUBTILES
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    section {
        animation: fadeInUp 0.6s ease-out;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ========================================
   FOCUS STATES ACCESSIBILITÉ
   ======================================== */
.button-location:focus-visible,
.button-services:focus-visible,
.button-tel:focus-visible,
.button-mess:focus-visible,
.lang-btn:focus-visible {
    outline: 3px solid var(--primary-green-light);
    outline-offset: 3px;
}

a:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}
