/* --- CONFIGURATION GÉNÉRALE --- */
@import url('https://fonts.googleapis.com/css2?family=Livvic:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,900&display=swap');

:root {
    --bg-blue-gucci: #F0F7FF;
    --white: #FFFFFF;
    --black: #000000;
    --grey-light: #e0e0e0;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--white);
    color: var(--black);
    font-family: 'Livvic', sans-serif;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.6;
}

/* --- HEADER & NAVIGATION - VERSION CORRIGÉE --- */

.main-header {
    background-color: var(--white);
    padding: 20px 40px 0;  /* ✅ Unifié à 40px (était 60px) */
    border-bottom: 1px solid var(--grey-light);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-top {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: center;  /* ✅ CHANGÉ: Centré au lieu de space-between */
    align-items: center;
    padding: 0;  /* ✅ CHANGÉ: Plus de padding (géré par le parent) */
    margin: 0 auto;  /* ✅ NOUVEAU: Centre le conteneur */
    position: relative;  /* ✅ NOUVEAU: Pour le positionnement absolu des icônes */
}

/* ✅ SOCIAL ICONS - Positionnement absolu à gauche */
.social-icons {
    position: absolute;  /* ✅ NOUVEAU */
    left: 40px;  /* ✅ NOUVEAU: Même padding que le header */
    flex: none;  /* ✅ NOUVEAU */
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--black);
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;  /* ✅ NOUVEAU */
    align-items: center;  /* ✅ NOUVEAU */
    justify-content: center;  /* ✅ NOUVEAU */
}

/* ✅ LOGO CONTAINER - Unifié et simplifié */
.logo-container {
    text-align: center;
    width: auto;  /* ✅ CHANGÉ: auto au lieu de 100% */
    flex: none;  /* ✅ CHANGÉ: none au lieu de 2 */
}

.logo-container a {
    display: flex;  /* ✅ NOUVEAU */
    align-items: center;  /* ✅ NOUVEAU */
    justify-content: center;  /* ✅ NOUVEAU */
}

.logo-container img {
    display: inline-block;
    transform-origin: center;
    vertical-align: middle;
    animation: pulsation-logo 3s infinite ease-in-out;
    transition: filter 0.2s ease;
    height: 100px;  /* ✅ NOUVEAU: Fixe la hauteur */
}

.logo-container img:hover {
    animation-play-state: paused;
    filter: brightness(1.1);
}

.logo-container h1 {
    font-family: 'Livvic', serif;
    font-size: 0.9rem;
    letter-spacing: 5px;
    margin: 0;
    text-transform: uppercase;
}

.subtitle {
    font-size: 0.55rem;
    letter-spacing: 3px;
    color: #666;
}

/* ✅ SPACER - Positionnement absolu à droite */
.spacer {
    position: absolute;  /* ✅ NOUVEAU */
    right: 40px;  /* ✅ NOUVEAU */
    flex: none;  /* ✅ NOUVEAU */
}

/* ✅ NAVIGATION PRINCIPALE */
.main-nav {
    display: flex;
    gap: 25px;  /* ✅ AUGMENTÉ de 15px à 25px pour meilleur espacement */
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 15px 40px;  /* ✅ Unifié à 40px */
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;  /* ✅ NOUVEAU: Permet le retour à la ligne sur petit écran */
}

/* ✅ LIENS DE NAVIGATION - Alignement parfait */
.main-nav a, .dropbtn {
    display: flex;  /* ✅ NOUVEAU: Flexbox pour alignement */
    align-items: center;  /* ✅ NOUVEAU: Centre verticalement */
    gap: 8px;  /* ✅ NOUVEAU: Espace entre texte et chevron */
    text-decoration: none;
    color: var(--black);
    font-size: 0.65rem;
    letter-spacing: 2px;
    font-weight: 400;
    white-space: nowrap;  /* ✅ NOUVEAU: Empêche le retour à la ligne du texte */
    transition: color 0.3s ease;  /* ✅ NOUVEAU: Animation de couleur */
}

.main-nav a:hover, .dropbtn:hover {
    color: #666;  /* ✅ NOUVEAU: Feedback visuel */
}

/* ✅ CHEVRON - Alignement spécifique */
.dropbtn i {
    font-size: 0.7rem;
    vertical-align: middle;  /* ✅ NOUVEAU */
    display: flex;  /* ✅ NOUVEAU */
    align-items: center;  /* ✅ NOUVEAU */
}

/* --- DROPDOWNS --- */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 180px;  /* ✅ LÉGÈREMENT AUGMENTÉ */
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    z-index: 100;
    border-radius: 4px;  /* ✅ NOUVEAU */
}

.dropdown-content a {
    padding: 12px 16px;
    display: block;
    border-bottom: 1px solid #f0f0f0;
    color: var(--black);
    text-decoration: none;
    transition: background-color 0.2s ease;  /* ✅ NOUVEAU */
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a:hover {
    background-color: var(--grey-light);
}

.dropdown-content a .nom-marie {
    background-color: transparent;
    padding: 2px 4px;
    color: var(--black);
    font-weight: 600;
    text-decoration: underline !important;
    display: inline-block;
    border-bottom: 1px solid var(--black);
    transition: all 0.3s ease;
}

.dropdown-content a:hover .nom-marie {
    border-bottom-color: #888;
}

/* ============ RESPONSIVITÉ ============ */

/* Tablettes */
@media (max-width: 1024px) {
    .main-header {
        padding: 15px 30px 0;
    }

    .header-top {
        padding: 0;
    }

    .social-icons {
        left: 30px;
    }

    .spacer {
        right: 30px;
    }

    .main-nav {
        padding: 12px 30px;
        gap: 20px;
    }

    .main-nav a, .dropbtn {
        font-size: 0.6rem;
        gap: 6px;
    }

    .dropbtn i {
        font-size: 0.65rem;
    }
}

/* Petites tablettes */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 20px 0;
    }

    .social-icons {
        left: 20px;
    }

    .spacer {
        right: 20px;
    }

    .main-nav {
        padding: 10px 20px;
        gap: 15px;
    }

    .logo-container img {
        height: 80px;
    }
}

/* Mobiles */
@media (max-width: 600px) {
    .main-header {
        padding: 10px 15px 0;
    }

    /* Sur mobile, on remet les icônes en haut */
    .social-icons {
        position: static;  /* ✅ CHANGÉ: Back to normal flow */
        justify-content: center;
        width: 100%;
        margin-bottom: 8px;
    }

    .logo-container img {
        height: 70px;
    }

    .main-nav {
        padding: 8px 15px;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav a, .dropbtn {
        font-size: 0.5rem;
        letter-spacing: 1px;
        gap: 4px;
    }

    .dropbtn i {
        font-size: 0.55rem;
    }

    .spacer {
        display: none;
    }

    .dropdown-content {
        min-width: 150px;
    }
}

/* Très petits mobiles */
@media (max-width: 400px) {
    .main-nav {
        gap: 8px;
    }

    .main-nav a, .dropbtn {
        font-size: 0.45rem;
        letter-spacing: 0.5px;
    }

    .logo-container img {
        height: 60px;
    }
}

/* Animation du logo */
@keyframes pulsation-logo {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* --- MASONRY LAYOUT PEXELS STYLE (PORTFOLIO) - AMÉLIORÉ --- */
#main-gallery {
    padding: 40px 20px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    grid-auto-rows: 250px;  /* 🔧 CHANGÉ: Hauteur FIXE par défaut au lieu de minmax */
    grid-auto-flow: dense;  /* 🔧 NOUVEAU: Remplit les trous automatiquement */
}

.work-item {
    overflow: hidden;
    background-color: #f9f9f9;
    position: relative;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Images en pleine hauteur/largeur */
.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    cursor: pointer;
}

/* EFFET AU SURVOL */
.work-item:hover img {
    transform: scale(1.05);
}

/* Items paysage - plus larges (mais hauteur normale) */
.work-item[data-ratio="landscape"] {
    grid-column: span 2;
}

/* Items portrait - hauteur augmentée */
.work-item[data-ratio="portrait"] {
    grid-row: span 1.2;
}

/* Items carré - taille normale */
.work-item[data-ratio="square"] {
    grid-column: span 1;
}

/* Titre au bas de l'image */
.work-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    font-size: 0.65rem;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.work-item:hover .work-title {
    opacity: 1;
}

/* --- RESPONSIVITÉ --- */

/* Tablettes */
@media (max-width: 1024px) {
    #main-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 10px;
        padding: 30px 15px;
        grid-auto-rows: 200px;  /* 🔧 Hauteur réduite pour tablettes */
    }

    .work-item[data-ratio="landscape"] {
        grid-column: span 2;
    }

    .work-item[data-ratio="portrait"] {
        grid-row: span 1;
    }
}

/* Mobiles */
@media (max-width: 600px) {
    #main-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 20px 10px;
        grid-auto-rows: 150px;  /* 🔧 Hauteur fixe pour mobiles */
        grid-auto-flow: row;  /* 🔧 Pas de dense sur mobile */
    }

    .work-item[data-ratio="landscape"] {
        grid-column: span 2;
    }

    .work-item[data-ratio="portrait"] {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* --- FORMULAIRES & PAGES --- */
.contact-section {
    max-width: 700px;
    margin: 80px auto;
    padding: 0 20px;
}

.form-group {
    margin-bottom: 35px;
}

input, textarea {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid var(--black);
    background: transparent;
    font-family: Livvic;
    text-transform: uppercase;
    outline: none;
}

button {
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 18px 50px;
    cursor: pointer;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

/* --- FOOTER --- */
footer {
    background-color: var(--white);
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid var(--grey-light);
}

.footer-logo {
    font-family: 'Livvic', serif;
    font-size: 0.9rem;
    margin-bottom: 15px;
    letter-spacing: 8px;
}

.copyright {
    font-size: 0.5rem;
    color: var(--black);
    opacity: 0.7;
}

/* --- NOUVEAU HERO SPLIT --- */
.hero-split {
    display: flex;
    height: 80vh;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: var(--white);
}

.hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    text-align: left;
    z-index: 10;
}

.hero-right {
    flex: 1;
    position: relative;
    height: 100%;
}

.hero-gradient-edge {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 150px;
    background: linear-gradient(to right, var(--white), transparent);
    z-index: 5;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

@keyframes zoomProgressif {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.15);
    }
}

.hero-right .slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-right .slide.active {
    opacity: 1;
    animation: zoomProgressif 6s infinite alternate ease-in-out;
}

.hero-text-content h1 {
    font-size: clamp(0.5rem, 5vw, 1.25rem);
    margin: 0;
    font-family: 'Livvic', serif;
}

/* --- BOUTON RETOUR EN HAUT --- */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--black);
    color: var(--white);
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 10px;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#backToTop:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

.logo-container a {
    display: block;
}

/* --- SECTION ABOUT --- */
.about-section {
    padding: 100px 10%;
    background: var(--bg-blue-gucci);
}

.about-grid {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-text { flex: 1; }
.about-image { flex: 1; }

.about-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border: 10px solid var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

@keyframes chanceler {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    50% { transform: rotate(-1deg); }
    75% { transform: rotate(0.5deg); }
    100% { transform: rotate(0deg); }
}

.about-image img {
    display: inline-block;
    animation: chanceler 5s infinite ease-in-out;
    transform-origin: center;
    border-radius: 5px;
}

.section-subtitle {
    display: inline-block;
    animation: chanceler 4s infinite ease-in-out;
    color: #888;
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 10px;
}

.about-text h2 {
    font-family: 'Livvic', serif;
    font-size: 1.3rem;
    margin-bottom: 30px;
    text-transform: none;
}

.about-text p {
    font-size: 0.7rem;
    text-transform: none;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

/* --- SECTION SERVICES --- */
.services-section {
    padding: 100px 10%;
    background-color: var(--white);
}

.services-header {
    text-align: center;
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.service-card {
    background: var(--bg-blue-gucci);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--grey-light);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.services-header h2 {
    font-size: 1.2rem;
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 10px;
    font-family: 'Livvic', serif;
}

.service-card h3 {
    font-family: 'Livvic', serif;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 0.6rem;
    text-transform: none;
    line-height: 1.6;
    color: #666;
}

/* --- BOUTON MINIMAL --- */
.btn-minimal {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid var(--black);
    color: var(--black);
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-minimal:hover {
    background: var(--black);
    color: var(--white);
}

@media (max-width: 900px) {
    .about-grid, .services-grid {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}

/* --- PAGES JURIDIQUES (ACCORDÉONS) --- */

.legal-page {
    padding: 120px 10% 80px;
    background: var(--white);
    max-width: 1000px;
    margin: auto;
    text-transform: none;
}

.legal-header {
    text-align: center;
    margin-bottom: 50px;
}

.legal-header h1 {
    font-family: 'Livvic', serif;
    font-size: 0.9rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.legal-header p {
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.legal-accordion {
    border-top: 1px solid var(--grey-light);
}

.accordion-item {
    border-bottom: 1px solid var(--grey-light);
}

.accordion-header {
    width: 100%;
    padding: 25px 0;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Livvic', serif;
    font-size: 0.7rem;
    text-align: left;
    color: #333;
    transition: all 0.3s ease;
}

.accordion-header:hover,
.accordion-item.active .accordion-header {
    color: var(--black);
    padding-left: 10px;
}

.accordion-header i {
    font-size: 0.7rem;
    transition: transform 0.4s ease;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    padding: 0;
}

.accordion-body p {
    font-size: 0.8rem;
    line-height: 1.8;
    color: #555;
    padding-bottom: 30px;
    margin: 0;
}

.accordion-item.active .accordion-body {
    max-height: 2000px;
    transition: max-height 0.8s cubic-bezier(1, 0, 1, 0);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

/* --- PAGE CONTACT --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    margin-top: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.info-item i {
    font-size: 1.2rem;
    color: #333;
    margin-top: 5px;
}

.info-item h3 {
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
    color: #888;
}

.info-item p {
    font-size: 0.9rem;
    text-transform: none;
    line-height: 1.5;
    color: var(--black);
}

.contact-submit-btn {
    width: 100%;
    background-color: var(--black);
    color: var(--white) !important;
    border: 1px solid var(--black);
    padding: 18px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-submit-btn:hover {
    background-color: transparent;
    color: var(--black) !important;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

.pro-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: #666;
}

.pro-form input, .pro-form textarea, .pro-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #eee;
    background: #f9f9f9;
    font-family: 'Livvic', sans-serif;
    text-transform: none;
}

.pro-form input:focus, .pro-form textarea:focus {
    outline: none;
    border-color: var(--black);
    background: #fff;
}

.success-msg {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 20px;
}

.pagination-nav button {
    font-size: 0.5rem !important;
    letter-spacing: 1px !important;
    padding: 8px 12px !important;
    font-family: 'Livvic', sans-serif !important;
}

.pagination-nav {
    gap: 10px !important;
    margin-top: 40px !important;
}
