/* ========================================= */
/* ARTISAN DU WEB - STYLE PRINCIPAL */
/* Design élégant, professionnel et intemporel */
/* ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Lato:wght@300;400;600;700&display=swap');

/* ========================================= */
/* 1. VARIABLES CSS */
/* ========================================= */

:root {
    --color-primary: #2C3E50;
    --color-secondary: #34495E;
    --color-accent: #D4AF37;
    --color-accent-light: #E8C468;
    --color-background: #FAF9F6;
    --color-card: #FFFFFF;
    --color-text: #2C3E50;
    --color-text-light: #6C7A89;
    --color-border: #E5E5E5;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', 'Helvetica Neue', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.08);
    --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.12);
    --shadow-lg: 0 8px 32px rgba(44, 62, 80, 0.16);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================= */
/* 2. RESET ET BASE */
/* ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-background);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Logo en filigrane sur toute la page - SANS FLOU */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../image/LOGO FCS.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

/* ========================================= */
/* 3. TYPOGRAPHIE ÉLÉGANTE */
/* ========================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    position: relative;
    padding-bottom: var(--spacing-md);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--color-accent);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
    font-size: 1.05rem;
    line-height: 1.8;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-accent-light);
}

/* ========================================= */
/* 4. HEADER - NAVIGATION RAFFINÉE */
/* ========================================= */

header.main-header {
    background: var(--color-background);
    backdrop-filter: none;
    padding: var(--spacing-md) 5%;
    position: relative;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

header.main-header nav {
    position: static;
    transform: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: var(--spacing-sm) var(--spacing-md);
    transition: var(--transition);
    position: relative;
    background: transparent;
    border: none;
    border-radius: 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 80%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
}

.nav-links a.cta-nav {
    background: transparent;
    color: var(--color-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 0;
    box-shadow: none;
}

.nav-links a.cta-nav:hover {
    transform: none;
    box-shadow: none;
    color: var(--color-accent);
}

.nav-links a.cta-nav::after {
    display: block;
}

/* Réseaux sociaux */
.social-nav {
    display: flex;
    gap: var(--spacing-sm);
    list-style: none;
}

.social-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-background);
    color: var(--color-primary);
    border: 2px solid var(--color-border);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-nav a:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

/* ========================================= */
/* 5. BOUTON RETOUR ÉLÉGANT */
/* ========================================= */

body.home .back-button-fixed {
    display: none;
}

.back-button-fixed {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1000;
}

.back-button-fixed .back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    font-size: 2rem;
    color: var(--color-primary);
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.back-button-fixed .back-link:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ========================================= */
/* 6. SECTION HERO */
/* ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 800px;
    background-image: url('../image/logo-acceuil.JPG');
    background-size: 90%;
    background-position: center 80px;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 60px 20px;
    animation: logoAppear 1.5s ease-out, logoPulse 4s ease-in-out infinite 1.5s, fadeIn 0.8s ease-out;
}

/* Animation d'apparition du logo */
@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Effet de brillance qui passe sur le logo */
.hero-section::after {
    content: '';
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 600px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(226, 224, 218, 0.15) 45%,
        rgba(241, 240, 233, 0.3) 55%,
        rgba(226, 224, 218, 0.15) 60%,
        transparent 100%
    );
    animation: shine 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50% {
        left: 150%;
    }
    100% {
        left: 150%;
    }
}

/* Effet de pulsation subtile */
@keyframes logoPulse {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 0 transparent);
    }
    50% {
        filter: brightness(1.05) drop-shadow(0 0 30px rgba(185, 178, 143, 0.3));
    }
}

/* CTA Hero */
.intro-message-container-deplace {
    max-width: 900px;
    text-align: center;
    padding: var(--spacing-xl) 5%;
    background: white;
    color: var(--color-text);
    margin: var(--spacing-xl) auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.intro-message-container-deplace::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
}

.introduction-text-deplace {
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
}

/* ========================================= */
/* 7. BOUTONS ARTISANAUX */
/* ========================================= */

.button {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
}

.button.primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: #222;
    text-shadow: 0 1px 2px rgba(255,255,255,0.15);
    box-shadow: var(--shadow-md);
}

.button.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

.button.primary.large {
    padding: calc(var(--spacing-md) + 4px) calc(var(--spacing-xl) + 10px);
    font-size: 1.1rem;
}

/* ========================================= */
/* 8. SECTIONS GÉNÉRALES */
/* ========================================= */

section {
    padding: var(--spacing-xl) 5%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}

/* Séparateur d'image */
.image-separator-section {
    text-align: center;
    padding: var(--spacing-xl) 5%;
    max-width: 1200px;
    margin: var(--spacing-xl) auto;
}

.image-separator-section .subtitle-text {
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.image-placeholder {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    height: auto;
    min-height: 300px;
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.image-placeholder .project-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

/* ========================================= */
/* 9. SECTION VALUES (Fondations) */
/* ========================================= */

.values-section {
    background: white;
    border-radius: var(--radius-lg);
    margin: var(--spacing-xl) auto;
    padding: var(--spacing-xl) 5%;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    animation: fadeIn 0.8s ease-out;
}

.values-section h2 {
    margin-bottom: var(--spacing-xl);
    color: var(--color-primary);
}

.value-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.value-points article {
    padding: var(--spacing-lg);
    background: var(--color-background);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-accent);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.value-points article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* ========================================= */
/* 10. SECTION PROCESS (Services) */
/* ========================================= */

.process-section {
    padding: var(--spacing-xl) 5%;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.process-steps article {
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-md);
    border-top: 4px solid var(--color-accent);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: fadeIn 0.8s ease-out;
}

.process-steps article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ========================================= */
/* 11. SECTION FINAL CTA */
/* ========================================= */

.final-cta {
    text-align: center;
    padding: var(--spacing-xl) 5%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    margin: var(--spacing-xl) auto;
    border-radius: var(--radius-lg);
    max-width: 1200px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease-out;
}

.final-cta h2 {
    color: white;
}

.final-cta h2::after {
    background: var(--color-accent);
}

/* ========================================= */
/* 12. FOOTER MINIMALISTE */
/* ========================================= */

footer {
    background: var(--color-primary);
    color: var(--color-background);
    padding: var(--spacing-lg) 5%;
    margin-top: 0;
}

.legal {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: var(--spacing-md) 0;
}

.legal p {
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    opacity: 0.8;
}

.legal a {
    color: var(--color-background);
    margin: 0 var(--spacing-sm);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.legal a:hover {
    color: var(--color-accent);
}

/* ========================================= */
/* 13. RESPONSIVE DESIGN */
/* ========================================= */

/* Tablettes */
@media (max-width: 1024px) {
    :root {
        --spacing-xl: 3rem;
    }
    
    .nav-links {
        gap: var(--spacing-md);
    }
    
    .nav-links a {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }
    
    .hero-section {
        min-height: 600px;
        background-size: 80%;
        background-position: center 60px;
    }
    
    .hero-section::after {
        height: 450px;
        top: 60px;
    }
}

/* Mobiles */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
    
    header.main-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) 5%;
        position: relative;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-xs);
        width: 100%;
    }
    
    .nav-links a {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.85rem;
    }
    
    .social-nav {
        justify-content: center;
        gap: var(--spacing-xs);
        width: 100%;
        flex-wrap: wrap;
    }
    
    .social-nav a {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .back-button-fixed {
        top: 20px;
        left: 20px;
    }
    
    .back-button-fixed .back-link {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    /* CORRECTION MAJEURE : Réduction de l'écart hero */
    .hero-section {
        min-height: 450px;
        background-size: 85%;
        background-position: center 20px;
        padding: 40px 20px 20px 20px;
        margin-bottom: 0;
    }
    
    .hero-section::after {
        height: 350px;
        top: 20px;
        width: 85%;
    }
    
    /* Réduction de l'écart avec la section suivante */
    .intro-message-container-deplace {
        padding: var(--spacing-lg) 5%;
        margin: var(--spacing-md) auto;
    }
    
    .introduction-text-deplace {
        font-size: 1.15rem;
    }
    
    section {
        padding: var(--spacing-lg) 5%;
    }
    
    /* Réduction des marges entre sections */
    .values-section {
        margin: var(--spacing-lg) auto;
        padding: var(--spacing-lg) 5%;
    }
    
    .value-points {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .process-steps {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .final-cta {
        padding: var(--spacing-lg) 5%;
        margin: var(--spacing-lg) auto;
    }
    
    .image-separator-section {
        padding: var(--spacing-lg) 5%;
        margin: var(--spacing-lg) auto;
    }
    
    .image-placeholder {
        min-height: 200px;
    }
}

/* Petits mobiles */
@media (max-width: 480px) {
    :root {
        --spacing-lg: 1.25rem;
        --spacing-xl: 1.5rem;
    }
    
    header.main-header {
        padding: var(--spacing-xs) 3%;
    }
    
    .nav-links {
        gap: 4px;
    }
    
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .social-nav a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .back-button-fixed {
        top: 15px;
        left: 15px;
    }
    
    .back-button-fixed .back-link {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }
    
    /* CORRECTION MAJEURE : Hero encore plus compact sur petits écrans */
    .hero-section {
        min-height: 350px;
        background-size: 90%;
        background-position: center 15px;
        padding: 30px 15px 15px 15px;
    }
    
    .hero-section::after {
        height: 280px;
        top: 15px;
        width: 90%;
    }
    
    .intro-message-container-deplace {
        padding: var(--spacing-md) 4%;
        margin: var(--spacing-sm) auto;
    }
    
    .introduction-text-deplace {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
        padding-bottom: var(--spacing-sm);
    }
    
    h2::after {
        width: 60px;
        height: 2px;
    }
    
    .button.primary.large {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }
    
    /* Réduction maximale des espacements */
    section {
        padding: var(--spacing-md) 4%;
    }
    
    .values-section {
        margin: var(--spacing-md) auto;
        padding: var(--spacing-md) 4%;
    }
    
    .values-section h2 {
        margin-bottom: var(--spacing-lg);
    }
    
    .value-points {
        gap: var(--spacing-sm);
    }
    
    .value-points article {
        padding: var(--spacing-md);
    }
    
    .process-steps {
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-lg);
    }
    
    .process-steps article {
        padding: var(--spacing-md);
    }
    
    .final-cta {
        padding: var(--spacing-md) 4%;
        margin: var(--spacing-md) auto;
    }
    
    .image-separator-section {
        padding: var(--spacing-md) 4%;
        margin: var(--spacing-md) auto;
    }
    
    .image-placeholder {
        min-height: 180px;
    }
}

/* Ultra petits écrans (< 375px) */
@media (max-width: 374px) {
    .hero-section {
        min-height: 300px;
        background-size: 95%;
        background-position: center 10px;
        padding: 20px 10px 10px 10px;
    }
    
    .hero-section::after {
        height: 240px;
        top: 10px;
        width: 95%;
    }
    
    .intro-message-container-deplace {
        margin: 0.5rem auto;
        padding: 1rem 3%;
    }
    
    .introduction-text-deplace {
        font-size: 0.95rem;
    }
}

/* ========================================= */
/* 14. ANIMATIONS SUBTILES */
/* ========================================= */

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

/* ========================================= */
/* 15. ACCESSIBILITÉ ET EMAIL NON CLIQUABLE */
/* ========================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

::selection {
    background: var(--color-accent-light);
    color: white;
}

/* Email non cliquable */
.email-text {
    color: var(--color-primary);
    font-weight: bold;
    letter-spacing: 0.5px;
    word-break: break-all;
}
