/* =================================================================
   POLICES ET VARIABLES CSS
   ================================================================= */

@font-face {
    font-family: 'fira';
    src: url('/polices/fira.woff2') format('woff2'),
         url('/polices/fira.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Libre Caslon Display';
    src: url('/polices/LibreCaslonDisplay.woff2') format('woff2'),
         url('/polices/LibreCaslonDisplay.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Oswald';
    src: url('/polices/Oswald.woff2') format('woff2'),
         url('/polices/Oswald.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'WindSong';
    src: url('/polices/WindSong.woff2') format('woff2'),
         url('/polices/WindSong.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Variables CSS */
:root {
    --primary-color: #9cc7aa;
    --secondary-color: #2c3e50;
    --accent-color: #f39c12;
    --focus-color: #174f35;
    --background-light: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #9cc7aa 0%, #88ad94 100%);
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-strong: 0 8px 30px rgba(0,0,0,0.15);
    --border-radius: 15px;
    --transition: all 0.3s ease;
    --font-main: 'Lato', 'Helvetica', 'sans-serif';
    --font-title: 'Lora', serif;
}

/* =================================================================
   STYLES DE BASE
   ================================================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--background-light);
    margin: 0;
    padding: 0;
}

a:link { text-decoration: none; }

/* ???????? Accessibilité : focus visible global ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
/* Remplace outline:none partiel ???? tous les éléments focusables ont un indicateur */
:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
    border-radius: 3px;
    box-shadow: 0 0 0 2px #fff;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-color) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px #fff !important;
}

/* ???????? Lien d'évitement (skip-to-content) ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.6rem 1.2rem;
    background: var(--secondary-color);
    color: #fff;
    font-weight: 700;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    transition: top 0.15s ease;
}
.skip-to-content:focus {
    top: 0;
}

a:visited { text-decoration: none; }

a:hover { color: #778877; text-decoration: underline dotted; }

h1, h2, h3 {
    font-family: var(--font-title);
    color: var(--secondary-color);
}

/* =================================================================
   HEADER ET NAVIGATION
   ================================================================= */

header {
    background-color: rgb(156, 199, 170);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content a img.logo {
    display: block;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0;
    padding: 0;
}

.author-name {
    color: #333;
    font-family: 'WindSong', cursive;
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 2px 2px 0px #74947e, 0 0 0.1em #ececec;
    margin: 0;
    position: relative;
}

.author-name-inner {
    position: relative;
}

.author-name-dot {
    position: absolute;
    top: 0.7em;
    left: 6.2em;
    font-size: 0.2em;
}

.author-name-mobile {
    display: none;
    color: #333;
    font-family: 'WindSong', cursive;
    font-size: 2rem;
    font-weight: 300;
    text-shadow: 2px 2px 0px #74947e, 0 0 0.1em #ececec;
    margin: 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 0;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
}

/* =================================================================
   SECTION HERO MODERNE
   ================================================================= */

.hero-modern {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-bg {
    display: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(156, 199, 170, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.hero-visual-left {
    display: flex;
    justify-content: center;
}

.hero-text-center {
    text-align: center;
}

.hero-visual-right {
    display: flex;
    justify-content: center;
}

.hero-title {
    margin: 0 0 2rem 0;
    color: white;
}

.title-main {
    display: block;
    font-size: 3.5rem;
    font-family: 'WindSong', cursive;
    font-weight: 300;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-description {
    font-size: 1.3rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    margin-bottom: 3rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.hero-actions {

    display: flex;

    gap: 1.5rem;

    justify-content: center;

    flex-wrap: wrap;

}



.btn-hero {

    display: inline-block;

    padding: 1rem 2rem;

    border-radius: 50px;

    text-decoration: none;

    font-weight: bold;

    font-size: 1.1rem;

    transition: var(--transition);

    text-align: center;

    min-width: 200px;

}



.btn-hero.primary {

    background: var(--accent-color);

    color: white;

    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);

}



.btn-hero.primary:hover {

    background: #e67e22;

    transform: translateY(-3px);

    box-shadow: 0 6px 25px rgba(243, 156, 18, 0.6);

}



.btn-hero.secondary {

    background: rgba(255,255,255,0.1);

    color: white;

    border: 2px solid rgba(255,255,255,0.3);

    backdrop-filter: blur(10px);

}



.btn-hero.secondary:hover {

    background: rgba(255,255,255,0.2);

    border-color: rgba(255,255,255,0.5);

    transform: translateY(-3px);

}



/* Portrait d'auteur */

.author-portrait {

    position: relative;

    margin-bottom: 2rem;

}



.author-img {

    width: 220px;

    height: auto;

    border-radius: 50%;

    border: 4px solid rgba(255,255,255,0.3);

    box-shadow: var(--shadow-strong);

    transform: scaleX(-1);

}



.portrait-decoration {

    position: absolute;

    top: -10px;

    left: -10px;

    right: -10px;

    bottom: -10px;

    border: 2px solid var(--accent-color);

    border-radius: 50%;

    opacity: 0.5;

    animation: pulse 3s infinite;

}



/* Livre en vedette avec effet 3D */

.featured-book {

    text-align: center;

}



.book-spotlight {

    position: relative;

    margin-bottom: 1.5rem;

}



.book-3d-container {

    position: relative;

    display: inline-block;

    transition: var(--transition);

}



.book-3d-container:hover {

    transform: translateY(-5px) scale(1.05);

}



.book-3d {

    max-width: 200px;

    height: auto;

    border-radius: 5px;

    position: relative;

    z-index: 2;

}



.cta-button {

    background: rgba(255,255,255,0.95);

    color: var(--secondary-color);

    padding: 1rem 2rem;

    border-radius: 30px;

    text-decoration: none;

    font-weight: bold;

    transition: var(--transition);

    box-shadow: var(--shadow-soft);

}



.cta-button:hover {

    background: white;

    transform: translateY(-2px);

    box-shadow: var(--shadow-strong);

}



/* =================================================================

   SECTIONS COMMUNES

   ================================================================= */



.section-header {

    text-align: center;

    margin-bottom: 4rem;

}



.section-header h2 {

    font-size: 2.5rem;

    color: var(--secondary-color);

    margin-bottom: 1rem;

}



.section-header p {

    font-size: 1.2rem;

    color: #666;

    max-width: 600px;

    margin: 0 auto;

}



/* =================================================================

   SECTION LIVRES

   ================================================================= */



.livres-section {

    padding: 6rem 2rem;

    max-width: 1400px;

    margin: 0 auto;

}



.serie-container {

    margin-bottom: 5rem;

}



.serie-header {

    text-align: center;

    margin-bottom: 3rem;

}



.serie-title {

    font-size: 2rem;

    color: var(--secondary-color);

    margin-bottom: 0.5rem;

}



.serie-subtitle {

    color: #666;

    font-size: 1.1rem;

    font-weight: bold;

}



.livres-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));

    gap: 2rem;

}



/* Cartes de livres */

.livre-card {

    background: white;

    border-radius: var(--border-radius);

    overflow: hidden;

    box-shadow: var(--shadow-soft);

    transition: var(--transition);

    position: relative;

    display: flex;

    flex-direction: column;

    min-height: 700px;

}



.livre-card:hover {

    transform: translateY(-5px);

    box-shadow: var(--shadow-strong);

}



.livre-badge {

    position: absolute;

    top: 1rem;

    right: 1rem;

    z-index: 10;

    padding: 0.5rem 1rem;

    border-radius: 20px;

    font-size: 0.8rem;

    font-weight: bold;

    text-transform: uppercase;

}



.livre-card.bestseller .livre-badge {

    background: var(--accent-color);

    color: white;

    animation: pulse 2s infinite;

}



.livre-card.nouveau .livre-badge {

    background: #e74c3c;

    color: white;

    animation: pulse 2s infinite;

}



.livre-card.cult .livre-badge {

    background: #9b59b6;

    color: white;

}



.livre-card.bientot .livre-badge {

    background: #34495e;

    color: white;

}



/* Visuel du livre avec effet 3D */

.livre-visual {

    position: relative;

    text-align: center;

    padding: 1.5rem;

    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);

}



.book-cover-container {

    position: relative;

    display: inline-block;

    transition: var(--transition);

    transform: perspective(800px) rotateY(-15deg);

}

.book-cover-link{
    display:block;
    color:inherit;
    text-decoration:none;
}



.livre-card:hover .book-cover-container {

    transform: perspective(800px) rotateY(-20deg) translateY(-5px) scale(1.05);

}



.livre-cover {

    width: 140px;

    height: auto;

    border-radius: 5px;

    position: relative;

    z-index: 3;

    box-shadow:

        0 8px 25px rgba(0,0,0,0.25),

        8px 0 20px rgba(0,0,0,0.15),

        inset -2px 0 3px rgba(255,255,255,0.1);

}



.book-spine-effect {

    position: absolute;

    right: -8px;

    top: 8px;

    width: 16px;

    height: calc(100% - 16px);

    background: linear-gradient(

        to right,

        rgba(0,0,0,0.4) 0%,

        rgba(0,0,0,0.3) 20%,

        rgba(0,0,0,0.2) 50%,

        rgba(255,255,255,0.1) 80%,

        rgba(255,255,255,0.2) 100%

    );

    border-radius: 0 3px 3px 0;

    z-index: 2;

    box-shadow:

        inset 2px 0 4px rgba(0,0,0,0.3),

        0 0 8px rgba(0,0,0,0.2);

}



.book-cover-container::after {

    content: '';

    position: absolute;

    right: -6px;

    top: 10px;

    width: 12px;

    height: calc(100% - 20px);

    background: linear-gradient(

        to right,

        rgba(255,255,255,0.9) 0%,

        rgba(240,240,240,0.8) 100%

    );

    border-radius: 0 2px 2px 0;

    z-index: 1;

    box-shadow:

        0 2px 8px rgba(0,0,0,0.1),

        inset 1px 0 2px rgba(0,0,0,0.1);

}



.livre-overlay {

    position: absolute;

    inset: 0;

    background: rgba(0,0,0,0.8);

    display: flex;

    align-items: center;

    justify-content: center;

    opacity: 0;

    transition: var(--transition);

}



.livre-visual:hover .livre-overlay,
.livre-visual:focus-within .livre-overlay {

    opacity: 1;

}



.overlay-btn {

    background: white;

    color: var(--secondary-color);

    padding: 0.8rem 1.5rem;

    border-radius: 25px;

    text-decoration: none;

    font-weight: bold;

    transform: translateY(20px);

    transition: var(--transition);

}



.livre-visual:hover .overlay-btn,
.livre-visual:focus-within .overlay-btn {

    transform: translateY(0);

}



.coming-soon-overlay-light {

    position: absolute;

    inset: 0;

    background: rgba(52, 73, 94, 0.4);

    display: flex;

    align-items: center;

    justify-content: center;

    color: white;

    text-align: center;

    border-radius: 5px;

}



.coming-soon-text {

    display: flex;

    flex-direction: column;

    gap: 0.5rem;

}



.coming-date {

    font-size: 1.2rem;

    font-weight: bold;

    color: var(--accent-color);

}



.coming-label {

    font-size: 0.9rem;

    opacity: 0.8;

}



/* Informations du livre */

.livre-info {

    padding: 1.5rem;

    flex-grow: 1;

    display: flex;

    flex-direction: column;

}



.livre-info h4 {

    color: var(--secondary-color);

    margin: 0 0 1rem 0;

    font-size: 1.2rem;

}



.livre-pitch {

    color: #555;

    line-height: 1.6;

    margin-bottom: 1rem;

    flex-grow: 1;

    font-size: 0.95rem;

}



.livre-features {

    display: flex;

    flex-wrap: wrap;

    gap: 0.8rem;

    margin-bottom: 1rem;

}



.feature {

    display: flex;

    align-items: center;

    gap: 0.5rem;

    background: var(--background-light);

    padding: 0.5rem 1rem;

    border-radius: 20px;

    font-size: 0.9rem;

}



.feature-icon {

    font-size: 1.1rem;

}



.serie-link, .livre-special, .livre-preview {

    display: flex;

    align-items: center;

    gap: 0.5rem;

    color: var(--primary-color);

    font-weight: bold;

    margin-bottom: 0.8rem;

}



.link-icon, .special-icon, .preview-icon {

    font-size: 1.1rem;

}



/* Actions du livre */

.livre-actions {

    padding: 1.5rem;

    padding-top: 0;

    display: flex;

    gap: 0.8rem;

    flex-wrap: wrap;

    margin-top: auto;

}



.btn-livre {

    flex: 1;

    padding: 0.8rem 1rem;

    border-radius: 8px;

    text-decoration: none;

    font-weight: bold;

    text-align: center;

    transition: var(--transition);

    border: none;

    cursor: pointer;

    font-size: 0.9rem;

    min-width: 120px;

}



.btn-livre.primary {

    background: var(--primary-color);

    color: white;

}



.btn-livre.primary:hover {

    background: var(--secondary-color);

    transform: translateY(-2px);

}



.btn-livre.secondary {

    background: var(--background-light);

    color: var(--secondary-color);

    border: 2px solid var(--primary-color);

}



.btn-livre.secondary:hover {

    background: var(--primary-color);

    color: white;

    transform: translateY(-2px);

}



.btn-livre.disabled {

    background: #ccc;

    color: #666;

    cursor: not-allowed;

}



.btn-notify {

    background: var(--accent-color);

    color: white;

    padding: 0.8rem 1.5rem;

    border-radius: 8px;

    border: none;

    font-weight: bold;

    cursor: pointer;

    transition: var(--transition);

}



.btn-notify:hover {

    background: #e67e22;

    transform: translateY(-2px);

}



/* =================================================================

   AVIS LECTEURS / CAROUSEL

   ================================================================= */



.avis-carousel-container {

    position: relative;

    margin-bottom: 1rem;

}



.avis-carousel {

    position: relative;

    overflow: hidden;

    border-radius: 8px;

}



.avis-slide {

    display: none;

    opacity: 0;

    transition: opacity 0.5s ease-in-out;

}



.avis-slide.active {

    display: block;

    opacity: 1;

}



.avis-highlight {

    background: linear-gradient(145deg, #f8f9fa 0%, #e8f5e8 100%);

    padding: 1.2rem;

    border-radius: 8px;

    border-left: 4px solid var(--primary-color);

    text-align: center;

    min-height: 140px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    position: relative;

}



.avis-stars {

    color: var(--accent-color);

    font-size: 1.2rem;

    margin-bottom: 0.5rem;

}



.avis-titre {

    display: block;

    margin-bottom: 0.5rem;

    color: var(--secondary-color);

    font-size: 1rem;

}



.avis-highlight em {

    display: block;

    margin-bottom: 0.5rem;

    color: var(--secondary-color);

    font-style: italic;

    line-height: 1.4;

}



.avis-highlight small {

    color: #666;

    font-weight: 500;

}



.avis-indicators {

    display: flex;

    justify-content: center;

    gap: 0.5rem;

    margin-top: 0.8rem;

}



.indicator {

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #ccc;

    cursor: pointer;

    transition: all 0.3s ease;

}



.indicator.active {

    background: var(--primary-color);

    transform: scale(1.2);

}



.indicator:hover {

    background: var(--accent-color);

}



/* Commentaires tronqués */

.avis-commentaire {

    display: block;

    margin-bottom: 0.5rem;

    color: var(--secondary-color);

    font-style: italic;

    line-height: 1.4;

    position: relative;

}



.comment-short,

.comment-full {

    display: inline;

}



.btn-read-more,

.btn-read-less {

    background: none;

    border: none;

    color: var(--primary-color);

    font-weight: bold;

    cursor: pointer;

    text-decoration: underline;

    font-size: 0.85rem;

    padding: 0;

    margin-left: 0.5rem;

    transition: color 0.3s ease;

}



.btn-read-more:hover,

.btn-read-less:hover {

    color: var(--secondary-color);

}



/* =================================================================

   SECTION NEWSLETTER

   ================================================================= */



.newsletter-section {

    padding: 4rem 2rem;

    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);

    position: relative;

}



.newsletter-container {

    max-width: 1000px;

    margin: 0 auto;

}



.newsletter-card {

    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);

    border-radius: 20px;

    padding: 2.5rem;

    box-shadow:

        0 20px 60px rgba(0, 0, 0, 0.1),

        0 8px 25px rgba(0, 0, 0, 0.05);

    border: 1px solid rgba(156, 199, 170, 0.2);

    position: relative;

    overflow: hidden;

    display: grid;

    grid-template-columns: auto 1fr auto;

    gap: 2.5rem;

    align-items: center;

    max-width: 1000px;

    margin: 0 auto;

}



.newsletter-card::before {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    height: 4px;

    background: linear-gradient(90deg, #9cc7aa 0%, #f39c12 50%, #9cc7aa 100%);

    animation: shimmer 3s linear infinite;

}



.newsletter-content {

    text-align: left;

    flex: 1;

}



.newsletter-benefits {

    display: flex;

    gap: 0.5rem;

    flex-wrap: wrap;

}



.benefit {

    background: rgba(156, 199, 170, 0.1);

    color: #2c3e50;

    padding: 0.3rem 0.8rem;

    border-radius: 20px;

    font-size: 0.8rem;

    border: 1px solid rgba(156, 199, 170, 0.2);

}



/* =================================================================

   SECTION ??? PROPOS

   ================================================================= */



.apropos-section {

    padding: 6rem 2rem;

    background: var(--background-light);

}



.apropos-container {

    max-width: 1200px;

    margin: 0 auto;

}



.apropos-content {

    display: grid;

    grid-template-columns: 400px 1fr;

    gap: 4rem;

    align-items: center;

}



.apropos-visual {

    position: relative;

    text-align: center;

}



.apropos-photo {

    width: 300px;

    height: 300px;

    border-radius: 50%;

    object-fit: cover;

    box-shadow: var(--shadow-strong);

}



.apropos-decoration {

    position: absolute;

    top: -20px;

    left: -20px;

    right: -20px;

    bottom: -20px;

    border: 3px solid var(--primary-color);

    border-radius: 50%;

    opacity: 0.3;

    animation: rotate 20s linear infinite;

}



.apropos-text h2 {

    color: var(--secondary-color);

    margin-bottom: 1.5rem;

    font-size: 2.2rem;

}



.apropos-intro {

    font-size: 1.2rem;

    color: #555;

    line-height: 1.6;

    margin-bottom: 2rem;

}



.apropos-details {

    display: flex;

    flex-direction: column;

    gap: 1.5rem;

    margin-bottom: 3rem;

}



.detail-item {

    display: flex;

    align-items: flex-start;

    gap: 1rem;

}



.detail-icon {

    font-size: 1.5rem;

    color: var(--primary-color);

    margin-top: 0.2rem;

}



.detail-item div {

    display: flex;

    flex-direction: column;

    gap: 0.3rem;

}



.detail-item strong {

    color: var(--secondary-color);

    font-size: 1.1rem;

}



.detail-item span {

    color: #666;

}



.apropos-passion {

    background: rgba(156, 199, 170, 0.1);

    padding: 1.5rem;

    border-radius: var(--border-radius);

    border-left: 4px solid var(--primary-color);

}



.apropos-passion em {

    color: var(--secondary-color);

    font-size: 1.1rem;

}



/* =================================================================

   SECTION ACTUALIT???S

   ================================================================= */



.actualites-section {

    padding: 6rem 2rem;

    background: var(--background-light);

}



.actualites-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));

    gap: 2rem;

    max-width: 1200px;

    margin: 0 auto 3rem;

}



.actualite-card {

    background: white;

    border-radius: var(--border-radius);

    overflow: hidden;

    box-shadow: var(--shadow-soft);

    transition: var(--transition);

}



.actualite-card:hover {

    transform: translateY(-5px);

    box-shadow: var(--shadow-strong);

}



.actualite-image img {

    width: 100%;

    height: 200px;

    object-fit: cover;

}



.actualite-content {

    padding: 2rem;

}



.actualite-date {

    color: var(--primary-color);

    font-weight: bold;

    font-size: 0.9rem;

    margin-bottom: 1rem;

}



.actualite-card h3 {

    color: var(--secondary-color);

    margin-bottom: 1rem;

    font-size: 1.3rem;

}



.read-more {

    color: var(--primary-color);

    text-decoration: none;

    font-weight: bold;

    transition: var(--transition);

}



.read-more:hover {

    color: var(--secondary-color);

}



.section-footer {

    text-align: center;

}



.btn-section {

    display: inline-block;

    background: var(--primary-color);

    color: white;

    padding: 1rem 2rem;

    border-radius: 30px;

    text-decoration: none;

    font-weight: bold;

    transition: var(--transition);

}



.btn-section:hover {

    background: var(--secondary-color);

    transform: translateY(-2px);

}



/* =================================================================

   MODAL

   ================================================================= */



.modal {

    display: none;

    position: fixed;

    z-index: 1000;

    left: 0;

    top: 0;

    width: 100%;

    height: 100%;

    background-color: rgba(0,0,0,0.5);

    backdrop-filter: blur(5px);

}



.modal-content {

    background-color: white;

    margin: 10% auto;

    padding: 2rem;

    border-radius: var(--border-radius);

    width: 90%;

    max-width: 500px;

    position: relative;

    animation: modalSlideIn 0.3s ease-out;

}



.modal-close {

    position: absolute;

    right: 1rem;

    top: 1rem;

    font-size: 2rem;

    cursor: pointer;

    color: #999;

    transition: var(--transition);

}



.modal-close:hover {

    color: var(--secondary-color);

}



#notification-form {

    display: flex;

    flex-direction: column;

    gap: 1rem;

    margin-top: 1rem;

}



#notification-form input {

    padding: 1rem;

    border: 2px solid var(--primary-color);

    border-radius: 8px;

    font-size: 1rem;

}



#notification-form button {

    background: var(--primary-color);

    color: white;

    padding: 1rem;

    border: none;

    border-radius: 8px;

    font-weight: bold;

    cursor: pointer;

    transition: var(--transition);

}



#notification-form button:hover {

    background: var(--secondary-color);

}



/* =================================================================

   FOOTER ET SOCIAL BAR

   ================================================================= */



footer {

    background-color: rgb(156, 199, 170);

    color: #333;

    padding: 0.5rem 0;

    font-size: 0.9rem;

    text-align: center;

}



footer p {

    margin: 0;

    text-align: center;

}



.social-bar {

    background-color: rgb(116, 148, 126);

    height: 30px;

    width: 100%;

    box-sizing: border-box;

}



.container {

    display: flex;

    align-items: center;

    justify-content: space-between;

    max-width: 1200px;

    margin: 0 auto;

    padding: 0 15px;

    height: 30px;

}



.social-icons {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    width: 100%;

    max-width: 1200px;

    height: 100%;

}



.social-icons a {

    margin-left: 0.7rem;

    display: flex;

    align-items: center;

}

/* =================================================================
   OVERRIDES DU SITE WEB
   ================================================================= */

:root{
    --primary-color:#9cc7aa;
    --secondary-color:#2c3e50;
    --accent-color:#b8860b;
    --background-light:#faf9f7;
    --font-main:fira,Helvetica,Arial,sans-serif;
    --font-title:'Libre Caslon Display',Georgia,serif
}

header{
    background-color:#9cc7aa;
    padding:.5rem 0;
    position:sticky;
    top:0;
    z-index:1000;
    box-shadow:0 2px 4px rgba(0,0,0,.1)
}

.header-content{
    display:flex;
    align-items:center;
    justify-content:space-between;
    max-width:1200px;
    margin:0 auto;
    padding:0 2rem
}

.header-content a img.logo,.logo{display:block}
.logo{width:80px;height:80px;margin:0;padding:0}

.author-name{
    margin:0;
    position:relative;
    color:#333;
    font-family:WindSong,cursive;
    font-size:2.5rem;
    font-weight:300;
    text-shadow:2px 2px 0 #74947e,0 0 .1em #ececec;
    white-space:nowrap
}

.author-name-inner{position:relative}
.author-name-dot{position:absolute;top:.7em;left:6.2em;font-size:.2em}
.author-name-mobile{
    display:none;
    color:#333;
    font-family:WindSong,cursive;
    font-size:2rem;
    font-weight:300;
    text-shadow:2px 2px 0 #74947e,0 0 .1em #ececec;
    margin:0
}

nav ul{
    display:flex;
    justify-content:center;
    gap:0;
    list-style:none;
    margin:0;
    padding:0
}

nav a{text-decoration:none;color:#2c3e50;font-weight:700}

.menu-toggle{
    display:none;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    padding:0;
    background:rgba(255,255,255,.18);
    border:1px solid rgba(44,62,80,.16);
    border-radius:12px;
    color:#2c3e50;
    cursor:pointer;
    transition:background .2s,border-color .2s,transform .2s,box-shadow .2s
}

.menu-toggle:hover{
    background:rgba(255,255,255,.28);
    border-color:rgba(44,62,80,.28);
    box-shadow:0 4px 14px rgba(44,62,80,.12)
}

.menu-toggle svg{
    width:24px;
    height:24px;
    display:block;
    stroke:currentColor;
    fill:none;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:2.2
}

.menu-toggle .menu-icon-bars{opacity:1;transition:opacity .18s ease,transform .18s ease}
.menu-toggle .menu-icon-close{opacity:0;transition:opacity .18s ease,transform .18s ease;transform:scale(.85)}
.menu-toggle[aria-expanded="true"]{background:rgba(44,62,80,.12);border-color:rgba(44,62,80,.26)}
.menu-toggle[aria-expanded="true"] .menu-icon-bars{opacity:0;transform:scale(.85)}
.menu-toggle[aria-expanded="true"] .menu-icon-close{opacity:1;transform:scale(1)}

.header-tools{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:.8rem;
    flex:1 1 420px;
    min-width:0
}

.site-search{
    display:flex;
    align-items:center;
    gap:.5rem;
    min-width:min(100%,360px);
    margin-left:auto
}

.site-search label{position:absolute;left:-9999px}
.site-search input{
    flex:1 1 auto;
    min-width:0;
    padding:.6rem .9rem;
    border-radius:999px;
    border:1px solid rgba(44,62,80,.18);
    background:#fff;
    color:#1f2933;
    font:inherit
}

.site-search button{
    padding:.6rem .95rem;
    border:0;
    border-radius:999px;
    background:#2c3e50;
    color:#fff;
    font-weight:700;
    cursor:pointer
}

.site-search button:hover{filter:brightness(1.05)}

.header-secondary{
    background:#f6f2ea;
    border-bottom:1px solid rgba(44,62,80,.08)
}

.header-secondary .container{
    max-width:1200px;
    margin:0 auto;
    padding:.45rem 1.5rem;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    flex-wrap:wrap
}

.page-trail{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:.2rem .45rem;
    min-width:0;
    max-width:min(50vw, 620px);
    padding:0;
    white-space:nowrap
}

.page-trail a,.page-trail span{
    color:#2c3e50;
    font-size:.8rem;
    text-decoration:none;
    line-height:1.2
}
.page-trail a:hover{text-decoration:underline}
.page-trail .crumb-sep{color:#7d8b79;flex:0 0 auto}

.page-back{display:flex;align-items:center}
.page-back .back-button{
    display:inline-flex;
    align-items:center;
    gap:.45rem;
    color:#2c3e50;
    text-decoration:none;
    font-weight:700
}

.page-back .back-button:hover{text-decoration:underline}
.page-back .back-button img{width:18px;height:18px}

.social-bar{
    background:#f0f6f2;
    height:auto;
    min-height:42px;
    padding:.2rem 0
}

.social-bar .container{
    max-width:1200px;
    margin:0 auto;
    padding:0 1.5rem;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.6rem;
    flex-wrap:nowrap
}

.social-bar-left{
    display:flex;
    align-items:center;
    gap:.35rem;
    min-width:0;
    flex:1 1 auto;
    flex-wrap:wrap;
    justify-content:flex-start
}

.social-bar-right{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:.25rem;
    min-width:0;
    flex:0 0 auto;
    flex-wrap:nowrap
}

.social-search{
    display:grid;
    grid-template-columns:minmax(0,175px) 1.7rem;
    align-items:center;
    gap:.2rem;
    min-width:0;
    flex:0 1 auto;
    margin:0;
    padding:0;
    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;
    max-width:none;
    width:auto
}

.social-search label{
    position:absolute;
    left:-9999px
}

.social-search input{
    width:100%;
    min-width:0;
    padding:.12rem 0;
    border:0;
    border-bottom:1px solid rgba(44,62,80,.22);
    border-radius:0;
    background:transparent;
    color:#1f2933;
    font:inherit;
    margin:0
}

.social-search button{
    width:1.45rem;
    height:1.45rem;
    padding:0;
    border:0;
    border-radius:999px;
    background:transparent;
    color:rgba(44,62,80,.82);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer
}

.social-search button svg{
    width:.82rem;
    height:.82rem;
    fill:currentColor;
    display:block
}

.social-bar .social-icons{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    width:auto;
    height:auto;
    gap:.04rem
}

.social-bar .social-icons a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:1.05rem;
    height:1.05rem;
    border-radius:999px;
    background:transparent
}

.social-bar .social-icons img{
    width:.64rem;
    height:.64rem;
    display:block;
    filter:none;
    opacity:.82
}

.social-bar .social-icons a:hover img{
    opacity:1;
    transform:scale(1.08)
}

main{min-height:70vh}

@media (max-width:768px){
    .author-name{display:none}
    .author-name-mobile{display:inline}
    .menu-toggle{display:flex}
    nav{display:none;flex-basis:100%;margin-left:0}
    nav.active{display:block}
    nav ul{flex-direction:column}
    .header-content{flex-wrap:wrap}
    .header-tools{width:100%;justify-content:stretch}
    .site-search{width:100%;min-width:0;margin-left:0}
    .logo{width:60px;height:60px}
    .social-bar{min-height:unset;padding:.18rem 0}
    .social-bar .container{padding-left:1rem;padding-right:1rem;flex-wrap:wrap}
    .social-bar-left{flex:1 1 100%}
    .social-bar-right{flex:1 1 100%;justify-content:space-between}
    .page-trail{
        max-width:100%;
        white-space:normal;
        padding:0
    }
    .social-search{grid-template-columns:minmax(0,1fr) 1.45rem;width:100%}
    .social-search input{width:100%}
    .social-search button{flex:0 0 auto}
    .social-bar .social-icons{width:auto;justify-content:flex-end}
}



.social-icons a:first-child {

    margin-left: 0;

}



.social-icons img {

    width: 22px;

    height: 22px;

    transition: transform 0.3s ease;
    filter: none;

}



.social-icons img:hover {

    transform: scale(1.15);

}



.retour .back-button {

    display: flex;

    align-items: center;

    text-decoration: none;

    padding-left: 10px;

    height: 30px;

}



.retour img:hover {

    transform: scale(1.15);

}



.retour img {

    transition: transform 0.3s ease;

    filter: brightness(0) invert(1);

    margin-right: 8px;

}



.retour span {

    font-family: "Courier New", Courier, monospace;

    font-size: 16px;

    color: #fff;

    font-weight: bold;

}



/* =================================================================

   BOUTONS G???N???RIQUES

   ================================================================= */



.btn {

    display: inline-block;

    background-color: var(--accent-color);

    color: white;

    padding: 0.7rem 1.5rem;

    text-decoration: none;

    border-radius: 30px;

    transition: background-color 0.3s ease;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: 1px;

    margin-top: 1rem;

    text-align: center;

}



.btn:hover {

    background-color: #e67e22;

}



.btn.disabled {

    background-color: #888;

    cursor: not-allowed;

    pointer-events: none;

}



.btn.secondary {

    background-color: #007bff;

}



.btn.secondary:hover {

    background-color: #0056b3;

}



/* =================================================================

   FORMULAIRES ET CONTACT

   ================================================================= */



.contact-form-container {

    width: 50%;

    margin: 0 auto;

    padding: 20px;

    background-color: #f9f9f9;

    border-radius: 8px;

    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

}



.contact-form-container h2 {

    text-align: center;

    margin-bottom: 20px;

}



.form-group {

    margin-bottom: 15px;

}



.form-group label {

    display: block;

    margin-bottom: 5px;

    font-weight: bold;

}



.form-group input,

.form-group textarea {

    width: 100%;

    padding: 10px;

    border: 1px solid #ddd;

    border-radius: 4px;

}



.form-group button {

    display: block;

    width: 100%;

    padding: 10px;

    background-color: #007bff;

    color: white;

    border: none;

    border-radius: 4px;

    cursor: pointer;

}



.form-group button:hover {

    background-color: #0056b3;

}



.contact-result {

    margin: 20px 0;

    padding: 10px;

    border-radius: 4px;

}



.error {

    color: #d9534f;

    background-color: #f2dede;

    border: 1px solid #d9534f;

}



.success {

    color: #5bc0de;

    background-color: #d9edf7;

    border: 1px solid #5bc0de;

}



form {

    display: flex;

    flex-direction: column;

    max-width: 500px;

    margin: 0 auto;

    background-color: white;

    padding: 2rem;

    border-radius: 10px;

    box-shadow: 0 4px 6px rgba(0,0,0,0.1);

}



input, textarea {

    margin-bottom: 1rem;

    padding: 0.8rem;

    border: 1px solid var(--primary-color);

    border-radius: 5px;

    font-family: var(--font-main);

}



/* =================================================================

   ANIMATIONS

   ================================================================= */



@keyframes pulse {

    0% { transform: scale(1); }

    50% { transform: scale(1.05); }

    100% { transform: scale(1); }

}



@keyframes rotate {

    from { transform: rotate(0deg); }

    to { transform: rotate(360deg); }

}



@keyframes modalSlideIn {

    0% { opacity: 0; transform: translateY(-50px); }

    100% { opacity: 1; transform: translateY(0); }

}



@keyframes shimmer {

    0% { background-position: -200% 0; }

    100% { background-position: 200% 0; }

}



/* =================================================================

   STYLES ANCIENS CONSERV???S POUR COMPATIBILIT???

   ================================================================= */



/* Styles pour les pages anciennes qui utilisent encore l'ancien système */

p {

    text-align: justify;

}



blockquote {

    font-style: italic;

    border-left: 4px solid var(--primary-color);

    padding-left: 1rem;

    margin: 2rem 0;

    font-size: 1.1rem;

}



/* Extraits de livres */

.extrait-container {

    background-color: white;

    padding: 2rem;

    border-radius: 10px;

    box-shadow: 0 4px 6px rgba(0,0,0,0.1);

}



/* Genres et tags */

.genre-tags {

    display: flex;

    flex-wrap: wrap;

    gap: 0.5rem;

    margin-top: 1rem;

}



.genre-tag {

    display: inline-block;

    background-color: var(--accent-color);

    color: white;

    padding: 0.3rem 0.8rem;

    border-radius: 20px;

    font-size: 0.8rem;

}



/* =================================================================

   RESPONSIVE DESIGN

   ================================================================= */



@media (max-width: 1200px) {

    .livres-grid {

        grid-template-columns: 1fr;

        gap: 1.5rem;

    }



    .apropos-photo {

        width: 250px;

        height: 250px;

    }

}



@media (max-width: 968px) {

    .livre-container {

        display: block;

    }



    .livre {

        flex-basis: 100%;

        margin-bottom: 2rem;

    }

}



@media (max-width: 768px) {

    .hero-content {

        grid-template-columns: 1fr;

        text-align: center;

        gap: 3rem;

    }



    .hero-visual-left,

    .hero-visual-right {

        order: 2;

    }



    .hero-text-center {

        order: 1;

    }



    .mobile-bg {

        display: block;

    }



    .desktop-bg {

        display: none;

    }



    .title-main {

        font-size: 2.5rem;

    }



    .hero-description {

        font-size: 1.1rem;

    }



    .apropos-content {

        grid-template-columns: 1fr;

        text-align: center;

        gap: 2rem;

    }



    .livre-card {

        min-height: auto;

    }



    .newsletter-section {

        padding: 3rem 1rem;

    }



    .newsletter-card {

        grid-template-columns: 1fr;

        text-align: center;

        gap: 1.5rem;

        padding: 1.5rem;

        max-width: none;

    }



    .newsletter-content {

        text-align: center;

    }



    .avis-highlight {

        min-height: 160px;

        padding: 1rem;

    }



    .btn-read-more,

    .btn-read-less {

        font-size: 0.8rem;

        display: block;

        margin: 0.5rem auto 0 auto;

        text-align: center;

    }



    .header-content {

        flex-wrap: wrap;

        padding: 0.25rem 1rem;

    }



    .logo {

        width: 60px;

        height: 60px;

        margin: 0;

        padding: 0;

    }



    .author-name {

        display: none;

    }



    .author-name-mobile {

        display: block;

    }



    .menu-toggle {

        display: flex;

    }



    nav {

        flex-basis: 100%;

        display: none;

    }



    nav.active {

        display: block;

    }



    nav.active ul {

        align-items: flex-end;

    }



    nav.active ul li {

        width: 100%;

        text-align: right;

    }



    nav ul {

        display: block;

        align-items: center;

    }



    nav ul li {

        margin: 0.5rem 0;

    }



    .retour {

        padding: 1rem 0;

    }



    .social-icons {

        padding: 0 1rem;

    }



    .social-icons img {

        width: 20px;

        height: 20px;

    }



    .contact-form-container {

        width: calc(100% - 40px);

        margin: 0 auto;

        padding: 20px;

    }



    .contact-form-container form {

        width: 100%;

        padding: 0 1rem;

        margin: 0 auto;

        box-sizing: border-box;

    }



    .contact-form-container input,

    .contact-form-container textarea,

    .contact-form-container button {

        width: 100%;

        padding: 0.5rem;

        margin: 0;

        box-sizing: border-box;

    }

}



@media (max-width: 480px) {

    .hero-modern {

        min-height: 70vh;

    }



    .section-header h2 {

        font-size: 2rem;

    }



    .livre-visual {

        padding: 1rem;

    }



    .livre-cover {

        width: 120px;

    }



    .author-img {

        width: 150px;

    }



    .book-3d {

        max-width: 150px;

    }

}



/* =================================================================

   STYLES CONSERV???S POUR AUTRES PAGES

   ================================================================= */



/* Pour les formulaires */

.hp{position:absolute;left:-5000px;height:0;width:0;overflow:hidden}



/* Slider et galeries pour les pages techniques */

#slider {

    position: relative;

    width: 400px;

    height: 400px;

    overflow: hidden;

    margin: auto;

    border: 1px solid #c2cdd1;

    box-shadow: 5px 5px #e7ebed;

    transform: perspective(350px) rotateY(-10deg) translateX(-20px);

}



#slider ul {

    position: relative;

    list-style: none;

    height: 100%;

    width: 10000%;

    padding: 0;

    margin: 0;

    transition: all 750ms ease;

    left: 0;

}



#slider ul li {

    position: relative;

    height: 100%;

    float: left;

}



#slider ul li img {

    width: 400px;

    height: 400px;

}



#prev, #next {

    width: 50px;

    line-height: 50px;

    border-radius: 50%;

    font-size: 2rem;

    text-shadow: 0 0 20px rgba(0, 0, 0, 0.6);

    text-align: center;

    color: white;

    text-decoration: none;

    position: relative;

    top: 50%;

    transform: translateY(-50%);

    transition: all 150ms ease;

    background-color: rgba(0, 0, 0, 0.1);

    box-shadow: 5px 5px #fefefe;

}



#prev:hover, #next:hover {

    background-color: rgba(94, 66, 66, 0.5);

}



/* Styles pour Yspaddaden */

.masque {

    display: none;

}



#plateauImg {

    max-width: 100%;

    height: auto;

}

/* =================================================================
   STYLES MANQUANTS POUR GALERIE.PHP ET DOCUMENT.PHP
   ================================================================= */

/* =================================================================
   STYLES POUR GALERIE.PHP
   ================================================================= */

/* Titre principal de catégorie */
.categorie {
    font-size: 2.5rem;
    color: var(--secondary-color);
    text-align: center;
    margin: 1rem 0 0.5rem 0; /* Réduit de 2rem à 1rem/0.5rem */
    font-family: var(--font-title);
    font-weight: bold;
}

/* Bandeau d'information */
.bandeau {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 0.5rem auto;
    max-width: 800px;
    font-weight: bold;
    box-shadow: var(--shadow-soft);
}

/* Description générale */
.description {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin: 0.5rem auto 1rem auto;
    max-width: 800px;
    line-height: 1.6;
}

/* Titre de rubrique dans la galerie */
.rubrique {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: var(--secondary-color);
    text-align: center;
    margin: 2.2rem 0 0.7rem 0;
    padding: 0;
    display: block;
    position: relative;
}

/* Trait décoratif centré sous le texte */
.rubrique::after {
    content: '';
    display: block;
    width: 3rem;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    margin: 0.35rem auto 0 auto;
}

/* Bloc centré contenant les rubriques et vignettes de la galerie */
.galerie-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

/* Conteneur flex pour les galeries avec légende (critique, etc.) */
/* Remplace inline-block + &nbsp; → élimine les espaces entre vignettes masquées */
.galerie-legende {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
    margin: 0.8rem auto 2rem auto;
}

/* Conteneur de galerie sans légende */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto;
    padding: 0.5rem;
}

.gallery a {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.gallery a:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.gallery img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* Conteneur de fichier avec légende */
.fichier, .fichier2 {
    display: inline-block;
    margin: 0.55rem;
    text-align: center;
    background: white;
    border-radius: var(--border-radius, 15px);
    overflow: hidden;
    box-shadow: var(--shadow-soft, 0 4px 20px rgba(0,0,0,0.1));
    transition: var(--transition, all 0.3s ease);
    max-width: 210px;
    position: relative; /* pour positionner le SVG */
}

.fichier2 {
    max-width: 230px;
}

.fichier:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.fichier2:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.fichier a, .fichier2 a {
    position: relative;
    display: block;
}

.fichier img, .fichier2 img {
    width: 100%;
    height: auto;
    display: block;
}

.fichier svg, .fichier2 svg {
    position: absolute !important;
    bottom: auto !important;
    top: 10px !important; /* Positionné en haut de l'image */
    right: 10px !important;
    width: 35px !important;
    height: 30px !important;
    z-index: 10 !important;
}

/* Nom de fichier sous l'image */
.nomfichier, .nomfichier2 {
    padding: 1rem;
    background: var(--background-light, #f8f9fa);
    border-top: 1px solid #eee;
}

.nomfichier2 {
    padding: 1.2rem;
}

.nomfichier .lignes,
.nomfichier2 .lignes {
    font-size: 0.9rem;
    color: var(--secondary-color, #2c3e50);
    font-weight: bold;
    line-height: 1.3;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* #triSelect et #marecherche sont désormais stylés via .galerie-toolbar select/input */

/* ???????? Barre de contrôles galerie ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.galerie-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.8rem;
    background: var(--background-light, #f8f9fa);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin: 0.5rem auto 1.2rem auto;
    max-width: 900px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Groupe atomique label + contrôle ???? ne se sépare jamais au wrap */
.galerie-toolbar .toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.galerie-toolbar .toolbar-group--search {
    flex: 1;
    min-width: 160px;
}

.galerie-toolbar label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.galerie-toolbar select,
.galerie-toolbar input[type="text"] {
    padding: 0.38rem 0.6rem;
    border: 1.5px solid #d0d0d0;
    border-radius: 7px;
    font-size: 0.9rem;
    background: white;
    color: var(--secondary-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
    height: 2rem;
    box-sizing: border-box;
}

.galerie-toolbar input[type="text"] {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.galerie-toolbar select:focus,
.galerie-toolbar input[type="text"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(156, 199, 170, 0.25);
}

.galerie-toolbar .toolbar-sep {
    width: 1px;
    height: 1.6em;
    background: #ddd;
    flex-shrink: 0;
    align-self: center;
}

.galerie-toolbar .toolbar-tri  { min-width: 165px; }
.galerie-toolbar .toolbar-genre { min-width: 140px; }

@media (max-width: 600px) {
    .galerie-toolbar {
        gap: 0.5rem;
        padding: 0.5rem 0.7rem;
    }
    .galerie-toolbar .toolbar-sep { display: none; }
    .galerie-toolbar .toolbar-group--search { flex-basis: 100%; }
    .galerie-toolbar select,
    .galerie-toolbar input[type="text"] { font-size: 0.85rem; }
}

/* =================================================================
   STYLES POUR DOCUMENT.PHP
   ================================================================= */

/* Navigation entre documents */
#bouton_precedent, #bouton_suivant {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 0.5rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

#bouton_precedent {
    left: 2rem;
}

#bouton_suivant {
    right: 2rem;
}

#bouton_precedent:hover, #bouton_suivant:hover {
    background: white;
    box-shadow: var(--shadow-strong);
}

#bouton_precedent img, #bouton_suivant img {
    display: block;
    transition: var(--transition);
}

#bouton_precedent:hover img, #bouton_suivant:hover img {
    transform: scale(1.1);
}

/* Contenu textuel des documents */
.texte {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    text-align: justify;
    line-height: 1.7;
    font-size: 1.1rem;
}

.texte p {
    margin-bottom: 1.5rem;
}

.texte h2, .texte h3, .texte h4 {
    color: var(--secondary-color);
    margin: 2rem 0 1rem 0;
}

/* Images d'illustration */
.illu {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    margin: 1rem 0;
}

/* Contexte/description en bas de page */
.contexte {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    line-height: 1.6;
}

/* Liens spéciaux */
.lien_perso {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.lien_perso:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.lien_perso.note {
    font-weight: bold;
    color: var(--accent-color);
}

.lien_perso.note:hover {
    color: #e67e22;
}

/* Liens vers ???uvres et personnages */
.oeuvre {
    color: var(--primary-color);
    font-style: italic;
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-color);
}

.oeuvre:hover {
    color: var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
}

.perso {
    color: var(--accent-color);
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dotted var(--accent-color);
}

.perso:hover {
    color: #e67e22;
    border-bottom: 1px solid #e67e22;
}

/* Détails dépliables */
details {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    border: 1px solid #ddd;
}

details summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

details[open] summary {
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

/* Contrôles audio */
audio {
    width: 100%;
    max-width: 500px;
    margin: 1rem 0;
}

/* =================================================================
   RESPONSIVE POUR GALERIE ET DOCUMENT
   ================================================================= */

@media (max-width: 768px) {
    .categorie {
        font-size: 2rem;
        margin: 1rem 0;
    }

    .rubrique {
        font-size: 1.1rem;
        margin: 1.8rem 0 0.6rem 0;
    }

    .gallery {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .gallery img {
        max-width: 150px;
        max-height: 150px;
    }

    .fichier, .fichier2 {
        max-width: 180px;
        margin: 0.5rem;
        height: 260px;
    }

    .fichier2 {
        max-width: 200px;
        height: 280px;
    }

    .nomfichier, .nomfichier2 {
        padding: 0.8rem;
        min-height: 50px;
    }

    .nomfichier .lignes,
    .nomfichier2 .lignes {
        font-size: 0.8rem;
        -webkit-line-clamp: 2; /* Moins de lignes sur mobile */
        line-clamp: 2; /* Propriété standard pour compatibilité */
    }

    .texte {
        padding: 1rem;
        margin: 1rem;
    }

    #bouton_precedent, #bouton_suivant {
        position: static;
        display: inline-block;
        margin: 1rem;
        transform: none;
    }

    .description {
        font-size: 1rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .categorie {
        font-size: 1.5rem;
    }

    .gallery img {
        max-width: 120px;
        max-height: 120px;
    }

    .fichier, .fichier2 {
        max-width: 150px;
        margin: 0.3rem;
        height: 220px;
    }

    .fichier2 {
        max-width: 160px;
        height: 240px;
    }

    .nomfichier, .nomfichier2 {
        padding: 0.6rem;
        min-height: 45px;
    }

    .nomfichier .lignes,
    .nomfichier2 .lignes {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}

/* =================================================================
   STYLES MANQUANTS ??? AJOUTER DANS STYLES.CSS
   ================================================================= */

/* =================================================================
   STYLES POUR LA MUSIQUE (musique.php)
   ================================================================= */
.playlist {
    list-style-type: none;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.li_musique {
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.li_musique:last-child {
    border-bottom: none;
}

.li_musique:hover {
    background-color: var(--background-light);
}

.li_musique a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

.li_musique a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.li_musique a span:first-child {
    font-weight: 500;
}

.li_musique a span:last-child {
    color: #666;
    font-size: 0.9rem;
    font-family: monospace;
}

/* Lecteur audio centré */
#player {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-shadow: var(--shadow-soft);
    border-radius: 8px;
}

/* =================================================================
   STYLES POUR LES OBSERVATIONS (obs.php)
   ================================================================= */
ul.tree {
    position: relative;
    padding-left: 20px;
    list-style-type: none;
    font-family: var(--font-main);
}

ul.tree::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10px;
    width: 1px;
    height: 100%;
    background: #ccc;
}

ul.tree li {
    position: relative;
    padding-left: 20px;
    color: var(--secondary-color);
    margin: 0.5rem 0;
    line-height: 1.4;
}

ul.tree li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 10px;
    height: 1px;
    background: #ccc;
}

ul.tree li i {
    font-style: italic;
    color: #777;
}

ul.tree li:hover {
    color: var(--primary-color);
}

ul.tree li:last-child::before {
    background: transparent;
}

.image-container {
    margin-top: 0.5rem;
    text-align: center;
}

.image-container img {
    max-width: 200px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.image-container img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-strong);
}

#image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

#image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--border-radius);
}

#image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    transition: var(--transition);
}

#image-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.button-container button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: bold;
}

.button-container button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* =================================================================
   STYLES POUR LA M???T???O (meteo.php)
   ================================================================= */
.meteo-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.meteo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 2rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.meteo-table th,
.meteo-table td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.meteo-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

.meteo-table .vertical {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    vertical-align: middle;
    background-color: var(--background-light);
    font-weight: bold;
}

.month-summary {
    background-color: #d6d8db;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.month-summary:hover {
    background-color: var(--primary-color);
    color: white;
}

.month-data {
    display: none;
}

.month-data.active {
    display: table-row-group;
}

/* Sélecteur pour les graphiques */
#dataSelector {
    font-size: 14px;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    background: white;
    color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
}

#dataSelector:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
    box-shadow: 0 0 0 3px rgba(156, 199, 170, 0.3);
}

/* Canvas pour les graphiques */
#temperatureChart {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    background: white;
    padding: 1rem;
}

/* =================================================================
   STYLES POUR LA CARTE DES FAITS DIVERS (div.php)
   ================================================================= */
.macarte {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

#map-container {
    position: relative;
    height: 650px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#map, #map2 {
    height: 100%;
    width: 100%;
}

#map2 {
    height: 600px;
    margin-top: 50px;
    position: relative;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.legend {
    background-color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin-top: 25px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.legend-title {
    width: 100%;
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    border-radius: 30px;
    background-color: rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.legend-item:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 0, 0, 0.05);
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#tooltip {
    position: absolute;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 13px;
    border-radius: var(--border-radius);
    pointer-events: none;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
    white-space: pre-line;
}

/* =================================================================
   STYLES POUR LES POPUPS LEAFLET
   ================================================================= */
.popup-content {
    min-width: 320px;
    max-width: 380px;
}

.popup-title {
    font-size: 16px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    font-weight: bold;
    color: var(--secondary-color);
}

.popup-table {
    table-layout: auto;
    width: 100%;
    font-size: 12px;
    border-spacing: 0;
}

.popup-table th, .popup-table td {
    padding: 4px 6px !important;
    vertical-align: middle;
    word-wrap: break-word;
    line-height: 1.2;
    border: 1px solid #ddd;
}

.popup-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #777;
    color: #fff;
    text-align: center;
    font-weight: bold;
    padding: 6px !important;
}

.popup-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.popup-table tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.article-link {
    width: 26px;
    height: 26px;
    font-size: 14px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
}

.article-link:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.event-count {
    font-weight: bold;
    color: var(--accent-color);
    background-color: rgba(244, 63, 94, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 8px;
}

.category-badge {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    padding: 2px 5px;
    font-size: 11px;
    font-weight: bold;
    color: #333;
    opacity: 0.9;
    border-radius: 3px;
}

/* =================================================================
   STYLES POUR LES TOOLTIPS
   ================================================================= */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text {
    visibility: hidden;
    width: auto;
    min-width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 12px;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* =================================================================
   STYLES POUR LA RECHERCHE (cherche.php)
   ================================================================= */
.search-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Styles pour les scores dans les résultats de recherche */
.score-circle {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 35px;
    height: 30px;
    z-index: 10;
}

/* =================================================================
   RESPONSIVE POUR LES NOUVEAUX STYLES
   ================================================================= */
@media (max-width: 768px) {
    .macarte {
        padding: 10px;
    }

    #map-container {
        height: 500px;
    }

    .popup-content {
        width: 100%;
        overflow-y: auto;
    }

    .legend-item {
        padding: 4px 10px;
        font-size: 13px;
    }

    .legend-color {
        width: 18px;
        height: 18px;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
    }

    .button-container button {
        width: 200px;
        margin: 0.5rem 0;
    }

    .meteo-table {
        font-size: 12px;
    }

    .meteo-table th,
    .meteo-table td {
        padding: 0.3rem;
    }

    .li_musique a {
        padding: 0.8rem 1rem;
    }

    ul.tree {
        padding-left: 15px;
    }

    ul.tree li {
        padding-left: 15px;
    }

    .image-container img {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .playlist {
        margin: 0 1rem;
    }

    .li_musique a {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .meteo-table {
        font-size: 10px;
    }

    .button-container button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    #image-modal-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
}

/* ???????? Classes utilitaires admin (F-005 : suppression de 'unsafe-inline' en style-src) ???????? */

.admin-login-error  { color: #a0291a; }
.admin-inline-form  { display: inline; margin-left: 1rem; }
.admin-msg-error    { color: red; }
.admin-msg-success  { color: green; }
.admin-msg-warning  { color: orange; }
.admin-mt-2         { margin-top: 2rem; }

/* Conteneur de canvas pour les graphiques (outils/noms.php) */
.chart-canvas-container { width: 100%; height: 250px; }

/* =================================================================
   CRITIQUE ???? LAYOUT LETTRINE ET NOTE
   ================================================================= */

/* Bloc image + texte côte à côte depuis le haut */
.critique-body {
    overflow: hidden; /* clearfix pour le float */
}

.critique-illu {
    float: left;
    width: 180px;
    height: auto;
    margin: 0 1.5rem 1rem 0;
    border-radius: 6px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #ddd;
}

.critique-texte {
    /* pas de overflow:hidden ici ???? on laisse le texte entourer l'image */
}

@media (max-width: 600px) {
    .critique-illu {
        float: none;
        display: block;
        width: 120px;
        margin: 0 auto 1rem auto;
    }

    .critique-reading-mode .critique-body {
        display: block;
    }

    .critique-reading-mode .critique-illu {
        width: 120px;
        max-width: 120px;
        margin: 0 auto 1rem auto;
    }

    .critique-toc ul {
        columns: 1;
    }
}

/* Pastille de note */
.critique-reading-mode {
    max-width: 74ch;
    margin: 0 auto;
}

.critique-reading-mode .critique-body {
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}

.critique-reading-mode .critique-illu {
    float: none;
    width: 100%;
    margin: 0;
    position: sticky;
    top: 1rem;
}

.critique-reading-mode .critique-texte {
    max-width: 64ch;
    font-size: 1.05rem;
    line-height: 1.9;
}

.critique-reading-mode .critique-texte p,
.critique-reading-mode .critique-texte li {
    line-height: 1.9;
}

.critique-reading-mode .critique-texte h2,
.critique-reading-mode .critique-texte h3,
.critique-reading-mode .critique-texte h4 {
    scroll-margin-top: 1rem;
}

.critique-tools {
    margin: 0 0 .65rem;
}

.critique-reading-mode .critique-tools {
    position: sticky;
    top: 0.75rem;
    z-index: 2;
}

.critique-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .25rem;
}


.critique-action {
    appearance: none;
    border: 1px solid rgba(44, 62, 80, 0.12);
    background: transparent;
    color: var(--secondary-color);
    border-radius: 999px;
    padding: .18rem .42rem;
    font: inherit;
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.35;
    opacity: .68;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s ease, border-color .15s ease, background-color .15s ease;
}

.critique-action:hover {
    border-color: rgba(44, 62, 80, 0.28);
    background: rgba(255, 255, 255, 0.55);
    opacity: 1;
}

.critique-reading-intro {
    margin: 0 0 .75rem;
    color: #5e4d36;
}

.critique-toc strong {
    display: block;
    margin-bottom: .35rem;
    color: var(--secondary-color);
}

.critique-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 1.5rem;
}

.critique-toc li {
    break-inside: avoid;
    margin: .2rem 0;
}

.critique-toc a {
    color: #4a3925;
    text-decoration: none;
}

.critique-toc a:hover {
    text-decoration: underline;
}

.critique-toc-level-3 {
    padding-left: .9rem;
}

.critique-toc-level-4 {
    padding-left: 1.6rem;
}

@media (max-width: 600px) {
    .critique-reading-mode {
        max-width: none;
    }

    .critique-reading-mode .critique-body {
        display: block;
    }

    .critique-toc ul {
        columns: 1;
    }
}

.critique-note-link {
    display: block;
    text-decoration: none;
    margin: 1.5rem auto 0.5rem auto;
    width: fit-content;
}

.critique-note-ring {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    margin: 0 auto;
}

.critique-note-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.critique-note-track,
.critique-note-meter {
    fill: none;
    stroke-width: 14;
}

.critique-note-track {
    stroke: #e0e0e0;
}

.critique-note-meter {
    stroke-linecap: butt;
}

.critique-note-inner {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.critique-note-label {
    font-size: 0.68rem;
    font-family: var(--font-main);
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.critique-note-value {
    font-size: 1.3rem;
    font-weight: bold;
    font-family: var(--font-title);
    color: var(--secondary-color);
    line-height: 1;
}

.critique-note-link:hover .critique-note-ring {
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* =================================================================
   COMMENTAIRES SUR LES CRITIQUES
   ================================================================= */

.comments-section {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.comments-section h2 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--primary-color);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.comment-item {
    background: var(--background-light);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    border-left: 3px solid var(--primary-color);
}

.comment-meta {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 0.4rem;
}

.comment-meta strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.comment-body {
    font-size: 0.97rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

/* Formulaire de commentaire */
.comment-form {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-soft);
}

.comment-form h3 {
    font-family: var(--font-title);
    font-size: 1.05rem;
    color: var(--secondary-color);
    margin: 0 0 1rem 0;
}

.comment-form .form-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.comment-form .form-field {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.comment-form label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.comment-form input[type="text"],
.comment-form textarea {
    padding: 0.5rem 0.7rem;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    font-size: 0.92rem;
    font-family: var(--font-main);
    color: var(--secondary-color);
    transition: border-color 0.2s;
    background: #fafafa;
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
    border-color: var(--primary-color);
    background: white;
}

.comment-form textarea {
    min-height: 90px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

.comment-form .form-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.8rem;
}

.comment-form button[type="submit"] {
    padding: 0.5rem 1.4rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.comment-form button[type="submit"]:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.comment-notice {
    font-size: 0.82rem;
    color: #888;
    margin-top: 0.7rem;
    font-style: italic;
}

.comment-actions {
    display: flex;
    gap: .5rem;
    margin-top: .55rem;
}

.comment-actions button,
.comment-reply-cancel {
    border: 1px solid rgba(44, 62, 80, .2);
    border-radius: 999px;
    background: #fff;
    color: var(--secondary-color);
    padding: .25rem .65rem;
    font: inherit;
    font-size: .78rem;
    cursor: pointer;
}

.comment-like-button[aria-pressed="true"] {
    color: #9b1c31;
    border-color: #9b1c31;
}

.comment-replies {
    margin: .8rem 0 0 1.2rem;
    padding-left: .8rem;
    border-left: 2px solid rgba(44, 62, 80, .14);
}

.comment-replies .comment-item {
    margin-top: .65rem;
    background: #fff;
}

.comment-replying {
    margin: 0 0 .8rem;
    padding: .55rem .7rem;
    border-radius: 6px;
    background: #f2f7f3;
    font-size: .85rem;
}

.comment-notice-empty {
    margin-bottom: 1.5rem;
}

.comment-form .form-field-spaced {
    margin-bottom: 0.8rem;
}

.score-badge-svg {
    position: absolute;
    bottom: 50px;
    right: 0;
    width: 35px;
    height: 30px;
    z-index: 10;
}

.share-bar {
    text-align: center;
    margin: 20px 0;
}

.share-bar .share-btn {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    background: #9cc7aa;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: background .2s, transform .2s;
}

.share-bar .share-btn:hover {
    background: #88ad94;
    transform: translateY(-2px);
}

.clipboard-fallback {
    position: fixed;
    left: -9999px;
}

/* Admin : gestion des commentaires */
.admin-comments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.admin-comments-table th,
.admin-comments-table td {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

.admin-comments-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.admin-comments-table tr:nth-child(even) {
    background: var(--background-light);
}

.admin-comments-table .comment-pending {
    background: #fff8e1;
}

.admin-comment-actions form {
    display: inline;
}

.admin-comment-actions button {
    padding: 0.25rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    margin-right: 0.3rem;
    font-weight: 600;
}

.btn-approve { background: #c8e6c9; color: #256029; }
.btn-approve:hover { background: #a5d6a7; }
.btn-delete  { background: #ffcdd2; color: #b71c1c; }
.btn-delete:hover  { background: #ef9a9a; }

.overlay-link {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    height:100%;
    color:inherit;
    text-decoration:none;
}

/* Pied de page commun, fixé en bas de l'écran. */
body {
    padding-bottom: 3.5rem;
}

main {
    padding-bottom: 1rem;
}

.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin: 0;
    color: #fbf3df;
    background: linear-gradient(100deg, #133426 0%, #1c4a37 55%, #2c6e51 100%);
    box-shadow: 0 -8px 24px -16px rgba(8, 24, 17, .7);
    font: 400 .86rem/1.3 'fira', 'Fira Sans Condensed', system-ui, sans-serif;
    overflow-x: auto;
    scrollbar-width: none;
    padding: .55rem 1rem calc(.55rem + env(safe-area-inset-bottom));
}

.site-footer::-webkit-scrollbar {
    display: none;
}

.site-footer p {
    margin: 0;
    color: #fbf3df;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
}

.site-footer p > span[aria-hidden="true"] {
    color: #f6cf5a;
    opacity: .7;
}

.site-footer a,
.site-footer .footer-cookies {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer .footer-cookies:hover {
    color: #f6cf5a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer .footer-cookies {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.site-footer a:focus-visible,
.site-footer .footer-cookies:focus-visible {
    outline: 3px solid #f6cf5a;
    outline-offset: 2px;
    border-radius: 3px;
}

.footer-links {
    gap: .45rem;
}

@media (max-width: 420px) {
    .site-footer {
        font-size: .78rem;
        padding-left: .6rem;
        padding-right: .6rem;
    }

    .site-footer p {
        gap: .3rem;
    }
}
