/* ===================================
   VARIABLES CSS - Personnalisation facile
   =================================== */
:root {
    /* Couleurs */
    --color-primary: #2c3e50;
    --color-secondary: #8b7355;
    --color-accent: #c9a882;
    --color-background: #faf8f5;
    --color-text: #2c2c2c;
    --color-text-light: #666666;
    --color-border: #d4c4b0;
    --color-card-bg: #ffffff;
    --color-shadow: rgba(44, 62, 80, 0.1);
    
    /* Typographie */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
    
    /* Espacement */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Layout */
    --max-width: 1400px;
    --border-radius: 4px;
    --transition: 0.3s ease;
}

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

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   HEADER
   =================================== */
.site-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #34495e 100%);
    color: white;
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 50h100M50 0v100" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></svg>');
    opacity: 0.5;
}

.header-content {
    position: relative;
    z-index: 1;
}

.site-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-sm);
}

.site-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* ===================================
   CONTAINER
   =================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

/* ===================================
   SECTIONS
   =================================== */
.gallery-section {
    margin-bottom: var(--spacing-xl);
}

.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-primary);
    text-align: center;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--color-secondary);
}

.section-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-text-light);
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.8;
}

/* ===================================
   GALLERY - 4 par ligne
   =================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.gallery-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--color-shadow);
    border-color: var(--color-secondary);
}

.gallery-card a {
    display: block;
    height: 100%;
}

.card-content {
    padding: var(--spacing-md);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.card-dates {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.meta-tag {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-light);
}

.card-quote {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: var(--color-secondary);
    line-height: 1.5;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.card-description {
    color: var(--color-text-light);
    line-height: 1.6;
    margin-top: auto;
}

/* ===================================
   PAGE FIGURE/ASSOCIATION - Layout
   =================================== */
.page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-secondary);
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
    transition: all var(--transition);
}

.back-link:hover {
    transform: translateX(-5px);
    color: var(--color-primary);
}

.page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-border);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.page-subtitle {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
    margin: var(--spacing-md) 0;
}

.meta-item {
    font-size: 1.1rem;
    color: var(--color-text-light);
}

.quote-box {
    background: var(--color-background);
    border-left: 4px solid var(--color-secondary);
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.quote-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--color-primary);
    line-height: 1.6;
}

/* ===================================
   CONTENT SECTIONS
   =================================== */
.content-section {
    margin-bottom: var(--spacing-xl);
}

.content-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-border);
}

.content-section p {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
    text-align: justify;
}

.content-section ul,
.content-section ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.content-section li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.8;
}

.content-section h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin: var(--spacing-lg) 0 var(--spacing-md);
}

.content-section blockquote {
    background: var(--color-background);
    border-left: 4px solid var(--color-accent);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    font-style: italic;
}

/* ===================================
   IMAGE GALLERY (optionnelle)
   =================================== */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.image-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    transition: transform var(--transition);
}

.image-gallery img:hover {
    transform: scale(1.05);
}

.image-caption {
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-align: center;
    margin-top: var(--spacing-xs);
}

/* ===================================
   BIBLIOGRAPHY / SOURCES
   =================================== */
.bibliography-list,
.sources-list {
    list-style: none;
    margin: 0;
}

.bibliography-item,
.source-item {
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--color-background);
    border-radius: var(--border-radius);
    transition: all var(--transition);
}

.bibliography-item:hover,
.source-item:hover {
    background: var(--color-card-bg);
    box-shadow: 0 2px 8px var(--color-shadow);
}

.bibliography-item a,
.source-item a {
    color: var(--color-secondary);
    font-weight: 500;
}

.bibliography-item a:hover,
.source-item a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ===================================
   TIMELINE (optionnelle)
   =================================== */
.timeline {
    position: relative;
    padding-left: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-md);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-secondary);
    border: 3px solid var(--color-background);
}

.timeline-year {
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-xs);
}

/* ===================================
   FOOTER
   =================================== */
.site-footer {
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    margin-top: var(--spacing-xl);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .page-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .timeline {
        padding-left: var(--spacing-md);
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.gallery-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.gallery-card:nth-child(1) { animation-delay: 0.1s; }
.gallery-card:nth-child(2) { animation-delay: 0.15s; }
.gallery-card:nth-child(3) { animation-delay: 0.2s; }
.gallery-card:nth-child(4) { animation-delay: 0.25s; }
.gallery-card:nth-child(5) { animation-delay: 0.3s; }
.gallery-card:nth-child(6) { animation-delay: 0.35s; }
.gallery-card:nth-child(7) { animation-delay: 0.4s; }
.gallery-card:nth-child(8) { animation-delay: 0.45s; }
.gallery-card:nth-child(n+9) { animation-delay: 0.5s; }