/**
 * Styles principaux du site Les Grands Peintres
 * 
 * Table des matières :
 * 1. Typographie
 * 2. Composants
 * 3. Cards
 * 4. Grilles
 * 5. Sections
 * 6. Navigation
 * 7. Formulaires
 * 8. Footer
 * 9. Pages spécifiques
 * 10. Utilitaires
 */

/* ══════════════════════════════════════════════════════════════
   1. TYPOGRAPHIE
   ══════════════════════════════════════════════════════════════ */

p {
    margin-bottom: var(--space-md);
}

.lead {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.text-muted { color: var(--color-text-muted); }
.text-small { font-size: 0.875rem; }

blockquote {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--color-text-muted);
    border-left: 4px solid var(--color-primary);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
}

/* ══════════════════════════════════════════════════════════════
   2. COMPOSANTS
   ══════════════════════════════════════════════════════════════ */

/* Tags */
.tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
}

.tag--primary {
    background: var(--color-primary);
    color: white;
}

/* Infobox */
.infobox {
    background: var(--color-bg-alt);
    border-left: 4px solid var(--color-primary);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.infobox h3 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.infobox dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-sm) var(--space-md);
}

.infobox dt {
    font-weight: 600;
    color: var(--color-text-muted);
}

.infobox dd {
    margin: 0;
}

/* AEO Answer Box */
.aeo-answer {
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, #fff 100%);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
}

.aeo-answer p:last-child {
    margin-bottom: 0;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: var(--space-xl);
}

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

.timeline-item {
    position: relative;
    padding-bottom: var(--space-lg);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-xl) - 4px);
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
}

.timeline-date {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

/* ══════════════════════════════════════════════════════════════
   3. CARDS
   ══════════════════════════════════════════════════════════════ */

.card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.card-body {
    padding: var(--space-md);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

.card-title a {
    color: var(--color-text);
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Peintre Card */
.peintre-card {
    text-align: center;
}

.peintre-card .card-image {
    aspect-ratio: 3/4;
}

.peintre-card .card-body {
    padding: var(--space-lg);
}

.peintre-card .card-title {
    font-size: 1.25rem;
}

.peintre-card .card-dates {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

/* Oeuvre Card */
.oeuvre-card .card-image {
    aspect-ratio: 1/1;
}

.oeuvre-card .card-title {
    font-size: 1rem;
    line-height: 1.3;
}

/* Mouvement Card */
.mouvement-card {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
    background: var(--color-accent);
    color: white;
}

.mouvement-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 1;
}

.mouvement-card .card-image {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

.mouvement-card .card-body {
    position: relative;
    z-index: 2;
    width: 100%;
}

.mouvement-card .card-title {
    color: white;
    font-size: 1.25rem;
}

.mouvement-card .card-title a {
    color: white;
}

.mouvement-card .card-meta {
    color: rgba(255,255,255,0.8);
}

/* ══════════════════════════════════════════════════════════════
   4. GRILLES
   ══════════════════════════════════════════════════════════════ */

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Masonry-like */
.masonry {
    columns: 3;
    column-gap: var(--space-lg);
}

.masonry > * {
    break-inside: avoid;
    margin-bottom: var(--space-lg);
}

/* ══════════════════════════════════════════════════════════════
   5. SECTIONS
   ══════════════════════════════════════════════════════════════ */

.section {
    padding: var(--space-3xl) 0;
}

.section--alt {
    background: var(--color-bg-alt);
}

.section--dark {
    background: var(--color-accent);
    color: white;
}

.section-header {
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    margin-bottom: var(--space-sm);
}

.section-header .lead {
    max-width: 600px;
}

.section-header--center {
    text-align: center;
}

.section-header--center .lead {
    margin: 0 auto;
}

.section-cta {
    margin-top: var(--space-xl);
    text-align: center;
}

/* Page Header */
.page-header {
    padding: var(--space-2xl) 0;
    background: var(--color-bg-alt);
    margin-bottom: var(--space-2xl);
}

.page-header h1 {
    margin-bottom: var(--space-sm);
}

.page-header .lead {
    max-width: 700px;
}

/* Peintre Header */
.peintre-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: var(--space-2xl) 0;
    background: var(--color-bg-alt);
}

.peintre-portrait {
    max-width: 300px;
    margin: 0 auto;
}

.peintre-portrait img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.peintre-info h1 {
    margin-bottom: var(--space-xs);
}

.peintre-dates {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.peintre-mouvements {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.peintre-citation {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.peintre-stats {
    display: flex;
    gap: var(--space-xl);
}

.peintre-stat {
    text-align: center;
}

.peintre-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.peintre-stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Oeuvre Header */
.oeuvre-header {
    background: var(--color-accent);
    padding: var(--space-xl) 0;
}

.oeuvre-image-container {
    max-width: 1000px;
    margin: 0 auto;
}

.oeuvre-image {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.oeuvre-image img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

.oeuvre-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.oeuvre-actions .btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.oeuvre-actions .btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Oeuvre Details */
.oeuvre-details {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.oeuvre-details dl {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-sm) var(--space-lg);
}

.oeuvre-details dt {
    font-weight: 600;
    color: var(--color-text-muted);
}

.oeuvre-details dd {
    margin: 0;
}

.oeuvre-details a {
    color: var(--color-primary);
}

/* ══════════════════════════════════════════════════════════════
   6. NAVIGATION
   ══════════════════════════════════════════════════════════════ */

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 300px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    padding: var(--space-md);
}

.dropdown-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.dropdown-list {
    list-style: none;
}

.dropdown-list li {
    margin-bottom: var(--space-xs);
}

.dropdown-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    color: var(--color-text);
    font-size: 0.9375rem;
}

.dropdown-list a:hover {
    color: var(--color-primary);
}

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

.dropdown-list--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs) var(--space-lg);
}

.dropdown-footer {
    border-top: 1px solid var(--color-border-light);
    padding: var(--space-md);
    margin-top: var(--space-sm);
}

/* Internal Navigation (page peintre) */
.internal-nav {
    position: sticky;
    top: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--color-border-light);
    z-index: 50;
}

.internal-nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
    overflow-x: auto;
    padding: var(--space-sm) 0;
    scrollbar-width: none;
}

.internal-nav ul::-webkit-scrollbar {
    display: none;
}

.internal-nav a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-muted);
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.internal-nav a:hover,
.internal-nav a.active {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.pagination a {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.pagination a:hover {
    background: var(--color-primary);
    color: white;
}

.pagination .current {
    background: var(--color-primary);
    color: white;
}

.pagination .dots {
    color: var(--color-text-muted);
}

/* ══════════════════════════════════════════════════════════════
   7. FORMULAIRES
   ══════════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(159, 56, 56, 0.1);
}

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

/* Search Panel */
.search-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
}

.search-panel[hidden] {
    display: none;
}

.search-panel form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-panel input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    font-size: 1.125rem;
    border: 2px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.search-panel input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-panel button[type="submit"] {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: white;
    cursor: pointer;
}

.search-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
}

/* ══════════════════════════════════════════════════════════════
   8. FOOTER
   ══════════════════════════════════════════════════════════════ */

.site-footer {
    background: var(--color-accent);
    color: white;
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
    color: white;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    font-size: 0.875rem;
}

.footer-copyright {
    color: rgba(255,255,255,0.5);
}

.footer-legal ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    list-style: none;
}

.footer-legal a {
    color: rgba(255,255,255,0.5);
}

.footer-legal a:hover {
    color: white;
}

/* ══════════════════════════════════════════════════════════════
   9. PAGES SPÉCIFIQUES
   ══════════════════════════════════════════════════════════════ */

/* Homepage Hero */
.home-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, #fff 100%);
    overflow: hidden;
}

.home-hero-bg {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    width: 60%;
    max-width: 700px;
    opacity: 0.3;
}

.home-hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.home-hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.home-hero .lead {
    margin-bottom: var(--space-xl);
}

.home-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

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

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.0625rem;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item__answer {
    padding-bottom: var(--space-lg);
    color: var(--color-text-muted);
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: var(--space-3xl) 0;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--space-md);
}

.error-page h2 {
    margin-bottom: var(--space-lg);
}

.error-page p {
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto var(--space-xl);
}

/* ══════════════════════════════════════════════════════════════
   10. UTILITAIRES
   ══════════════════════════════════════════════════════════════ */

/* Marges */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-lg); }
.mt-3 { margin-top: var(--space-xl); }
.mt-4 { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-lg); }
.mb-3 { margin-bottom: var(--space-xl); }
.mb-4 { margin-bottom: var(--space-2xl); }

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

/* Conteneur d'images */
.img-container {
    position: relative;
    overflow: hidden;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ratio d'aspect */
.aspect-1-1 { aspect-ratio: 1/1; }
.aspect-4-3 { aspect-ratio: 4/3; }
.aspect-16-9 { aspect-ratio: 16/9; }
.aspect-3-4 { aspect-ratio: 3/4; }

/* Publicités */
.ad-container {
    margin: var(--space-xl) 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    background: var(--color-bg-alt);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-lg);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}
