/* ============================================
   PORTFOLIO MONIQUE GRISON - STYLES PRINCIPAUX
   Site vitrine pour gravures de mode habillées
   ============================================ */

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Palette de couleurs élégante */
    --color-bg-main: #faf9f6;
    --color-bg-alt: #ffffff;
    --color-text: #1a1a1a;
    --color-text-light: #4a4a4a;
    --color-text-muted: #6b6b6b;
    --color-accent: #8b7355;
    --color-accent-dark: #5c4d3a;
    --color-border: #e5e3df;
    
    /* Typographie */
    --font-primary: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-secondary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- TYPOGRAPHIE --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

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

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

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

p {
    margin-bottom: var(--spacing-sm);
}

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

a:hover, a:focus {
    color: var(--color-accent);
    outline: none;
}

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

/* --- LAYOUT PRINCIPAL --- */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* --- NAVIGATION --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-sm) 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    z-index: 101;
}

/* Menu hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    transition: all var(--transition-base);
}

.nav-toggle:hover span {
    background-color: var(--color-accent);
}

/* État ouvert du menu hamburger */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    flex-wrap: wrap;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding: var(--spacing-xs) 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

/* Menu mobile */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-bg-alt);
        flex-direction: column;
        padding: var(--spacing-xl) var(--spacing-md);
        gap: var(--spacing-md);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right var(--transition-base);
        z-index: 100;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: var(--spacing-sm) 0;
        font-size: 1rem;
    }
    
    /* Overlay sombre quand menu ouvert */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    .nav-overlay.active {
        display: block;
    }
}

/* --- HEADER / HERO --- */
.hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-sm);
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.5)), url('../images/about/photo-artiste-monique-grison.jpg');
    background-size: cover;
    background-position: center 40%;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #ffffff;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.4) 0%, rgba(139, 115, 85, 0.3) 100%);
    z-index: 1;
}

.hero > .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: var(--spacing-sm);
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-family: var(--font-secondary);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--spacing-lg);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* --- SECTIONS --- */
.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--color-accent);
}

/* Styles pour sections avec fond alternatif */
.section-alt {
    background-color: var(--color-bg-alt);
    padding: var(--spacing-xl) 0;
}

/* Styles pour call-to-action */
.cta-section {
    text-align: center;
}

.cta-title {
    margin-bottom: var(--spacing-md);
}

.cta-description {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-bg-alt);
    background-color: var(--color-text);
    border: 1px solid var(--color-text);
    transition: background-color var(--transition-base), color var(--transition-base);
}

.cta-button:hover,
.cta-button:focus {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg-alt);
}

/* --- GRID ÉDITORIAL --- */
.grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-item {
    position: relative;
    overflow: hidden;
}

/* --- GALLERIE PORTFOLIO --- */

/* Liens autour des images */
.image-link {
    display: inline-block;
}

/* Modale cachée par défaut */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* Affichage via :target */
.image-modal:target {
    display: flex;
}

/* Image plein écran */
.image-modal img {
    max-width: 90%;
    max-height: 90%;
}

/* Bouton fermer */
.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    text-decoration: none;
}

.image-modal-close:hover {
    opacity: 0.7;
}

/* Curseur sur les miniatures */
.about-visual {
    cursor: zoom-in;
}



/* --- GALLERIE MASONRY --- */
.gallery {
    column-count: 1;
    column-gap: var(--spacing-md);
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .gallery {
        column-count: 2;
        column-gap: var(--spacing-lg);
    }
}

@media (min-width: 1200px) {
    .gallery {
        column-count: 3;
    }
}

/* Empêcher la coupure des cartes entre colonnes */
.gallery .oeuvre-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: var(--spacing-md);
    display: inline-block;
    width: 100%;
}

@media (min-width: 768px) {
    .gallery .oeuvre-card {
        margin-bottom: var(--spacing-lg);
    }
}

.oeuvre-card {
    background-color: var(--color-bg-alt);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.oeuvre-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.oeuvre-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: var(--color-bg-main);
    display: block;
}

/* Pour la masonry, on laisse les images garder leur ratio naturel */
.oeuvre-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.oeuvre-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform var(--transition-slow);
    display: block;
}

.oeuvre-card:hover .oeuvre-image {
    transform: scale(1.05);
}

.oeuvre-info {
    padding: var(--spacing-md);
}

.oeuvre-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.oeuvre-description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.oeuvre-links {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.oeuvre-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-base), color var(--transition-base);
}

.oeuvre-link:hover,
.oeuvre-link:focus {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* --- MODAL LIGHTBOX (CSS uniquement avec :target) --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity var(--transition-base);
    overflow-y: auto;
}

.lightbox:target {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    padding: var(--spacing-md);
}

/* Lien invisible sur le fond pour fermer en cliquant autour de l'image */
.lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
    background-color: transparent;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    pointer-events: none; /* Permet de cliquer à travers pour atteindre le backdrop */
}

.lightbox-content img,
.lightbox-content a,
.lightbox-nav {
    pointer-events: auto; /* Réactive les interactions sur le contenu */
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    animation: lightboxFadeIn var(--transition-slow);
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background-color var(--transition-base), transform var(--transition-base);
    z-index: 3;
    text-decoration: none;
}

.lightbox-close:hover,
.lightbox-close:focus {
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    transform: scale(1.1);
}

.lightbox-nav {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.lightbox-nav-link {
    color: #ffffff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background-color var(--transition-base);
}

.lightbox-nav-link:hover,
.lightbox-nav-link:focus {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Flèches de navigation dans la lightbox */
.lightbox-nav-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 1.5rem;
    text-decoration: none;
    border-radius: 50%;
    transition: background-color var(--transition-base), transform var(--transition-base);
    z-index: 3;
    pointer-events: auto;
}

.lightbox-nav-arrows:hover,
.lightbox-nav-arrows:focus {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-prev {
    left: 20px;
}

.lightbox-nav-next {
    right: 20px;
}

@media (max-width: 767px) {
    .lightbox-nav-arrows {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-nav-prev {
        left: 10px;
    }
    
    .lightbox-nav-next {
        right: 10px;
    }
}

/* --- PAGE OEUVRES --- */
.oeuvres-header {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
}

.oeuvres-intro {
    text-align: center;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* --- PAGE ABOUT --- */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

/* --- PAGE INDEX --- */
.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

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

.about-grid {
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: 1fr;
    margin-top: var(--spacing-xl);
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.about-visual {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base);
}

.about-visual:hover {
    transform: scale(1.02);
}

.about-visual-caption {
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-align: center;
    font-style: italic;
}

/* --- PAGE CONTACT --- */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.contact-info {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md);
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
}

.contact-info-item {
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

.contact-info-item a {
    color: var(--color-accent);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-base);
}

.contact-info-item a:hover {
    border-bottom-color: var(--color-accent);
}

/* --- FORMULAIRE --- */
.contact-form {
    background-color: var(--color-bg-alt);
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--spacing-sm);
    font-family: var(--font-secondary);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-main);
    color: var(--color-text);
    transition: border-color var(--transition-base);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
}

.form-submit {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-secondary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-bg-alt);
    background-color: var(--color-text);
    border: 1px solid var(--color-text);
    cursor: pointer;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.form-submit:hover,
.form-submit:focus {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg-alt);
}

.form-group-submit {
    text-align: center;
    margin-top: var(--spacing-md);
}
/* --- MESSAGES DE VALIDATION (PHP) --- */

/* Message de succès (envoi réussi) */
.success-message {
    background-color: #e8f5e9; /* Fond vert très clair */
    color: #2e7d32;           /* Texte vert foncé */
    padding: var(--spacing-sm);
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    margin-bottom: var(--spacing-md);
    text-align: center;
    font-weight: 500;
}

/* Erreur globale (échec de l'envoi mail) */
.error-message {
    background-color: #ffeeb2; /* Fond orangé/jaune pour l'alerte serveur */
    color: #856404;
    padding: var(--spacing-sm);
    border: 1px solid #ffeeba;
    border-radius: 4px;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

/* Erreurs de champs individuels (Email, Message, Captcha) */
.form-error {
    color: #d32f2f;           /* Rouge vif */
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* --- FOOTER --- */
.footer {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* --- UTILITAIRES --- */
.text-center {
    text-align: center;
}

.mt-large {
    margin-top: var(--spacing-xl);
}

.mb-large {
    margin-bottom: var(--spacing-xl);
}

/* --- ACCESSIBILITÉ --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- ANCHOR INVISIBLE POUR FERMER LES LIGHTBOX --- */
#close-lightbox {
    position: absolute;
    top: -9999px;
    left: -9999px;
}

/* --- RESPONSIVE --- */
@media (max-width: 767px) {
    .hero {
        min-height: 50vh;
        background-attachment: scroll;
    }
    
    .lightbox:target {
        padding: var(--spacing-sm);
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    
    .gallery {
        column-gap: var(--spacing-sm);
    }
    
    .gallery .oeuvre-card {
        margin-bottom: var(--spacing-sm);
    }
}

