/* style.css - Thème Bibliothèque */
/* Modern Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif; /* Plus adapté pour une bibliothèque */
    color: #4a4a4a;
    line-height: 1.6;
    background-color: #fcf9f2; /* Couleur papier vieilli très léger */
}

h1, h2, h3, h4, .logo, nav a {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* Typography & Colors */
:root {
    --primary: #8b4513; /* Marron cuir/bois */
    --secondary: #d2b48c; /* Beige/Tan */
    --dark: #2c1e16; /* Marron très foncé */
    --light: #fffdf5; /* Crème */
    --gray: #6b6b6b;
    --accent: #cd5c5c; /* Rouge indien pour les éléments importants */
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Nav */
header {
    background: var(--dark);
    color: var(--light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid var(--primary);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary);
    text-decoration: none;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1.1rem;
}

nav a:hover, nav a.active {
    color: var(--secondary);
    text-decoration: underline;
}

/* Hero Section */
.hero {
    height: 80vh;
    /* Image de bibliothèque/livres locale dans le dossier images/ */
    background: linear-gradient(rgba(44, 30, 22, 0.7), rgba(44, 30, 22, 0.7)), url('../images/hero-bg.jpg') center/cover;
    display: flex;
    align-items: center;
    color: var(--light);
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: #fff;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Trebuchet MS', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 10px auto 0;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    align-items: center;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.08); /* Ombre chaude */
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s;
    border-top: 5px solid var(--secondary);
}

.card:hover {
    transform: translateY(-8px);
    border-top-color: var(--primary);
}

/* Images Responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Video */
.video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 8px solid white;
}

video {
    width: 100%;
    display: block;
}

/* Footer */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    padding: 4rem 0 1rem;
    margin-top: 4rem;
    border-top: 4px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-grid h3 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid li {
    margin-bottom: 0.8rem;
}

.footer-grid a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-grid a:hover {
    color: var(--light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Forms */
form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.08);
    border-top: 4px solid var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--dark);
    font-family: 'Trebuchet MS', sans-serif;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.2);
}

/* Tables - Abonnement Bibliothèque */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.08);
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--dark);
    color: var(--secondary);
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
}

tr:nth-child(even) {
    background-color: var(--light);
}

tr:hover {
    background-color: #f0e6d2;
}

/* Figures & Captions - L'équipe */
figure {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin: 0;
    transition: transform 0.3s;
    border: 1px solid #eee;
}

figure:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(139, 69, 19, 0.1);
}

figure img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

figcaption {
    padding: 1.5rem;
    text-align: center;
    background: white;
    border-top: 3px solid var(--secondary);
}

figcaption h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Details / Summary */
details {
    background: white;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid #e0d8c0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

details[open] {
    border-left: 4px solid var(--primary);
}

summary {
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--dark);
    font-family: 'Trebuchet MS', sans-serif;
    list-style-position: inside;
}

details p {
    margin-top: 1rem;
    color: var(--gray);
    line-height: 1.8;
}

details ul {
    margin-top: 1rem;
    margin-left: 1.5rem;
    color: var(--gray);
}

/* Map Iframe */
iframe {
    width: 100%;
    border: none;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Quotes */
blockquote {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--dark);
    border-left: 4px solid var(--secondary);
    padding-left: 1rem;
    margin: 1rem 0;
}
