/* ==========================================================================
   1. POLICES ET STYLES DE BASE (BASE STYLES & FONTS)
   ========================================================================== */


body {
    font-family: 'Raleway', sans-serif;
    background-color: #D9D7D2;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%; /* Empêche le zoom auto sur mobile */
}

/* Classe utilitaire */
.hidden {
    display: none !important;
}

/* ==========================================================================
   2. STRUCTURE ET LAYOUT (LAYOUT & COMMON COMPONENTS)
   ========================================================================== */

/* --- Conteneur Principal --- */
.main-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* --- Header --- */
header {
    text-align: center;
    padding: 20px 0;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    padding: 2rem 8rem;
}

.logo-container {
    margin: 0;
}

.main-logo {
    max-width: 100%;
    height: auto;
    max-height: 25rem;
}

.header-main h2 {
    font-size: 1.8rem;
    font-weight: bold;
    font-style: italic;
    color: #000;
    margin: 1rem 0;
}

.header-main h2 .artist-name {
    font-style: normal;
}

.header-main p {
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0 auto;
    padding: 2rem 1rem;
    max-width: 90%;
    line-height: 1.3;
}

/* --- Navigation Principale --- */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.main-nav a {
    color: black;
    font-size: 1.5rem;
    text-decoration: none;
}

/* --- Section des liens rapides (sous le header) --- */
.quick-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    gap: 40px;
}

.quick-link a {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    text-decoration: underline;
    padding: 5px 15px;
    line-height: 1.2;
    display: inline-block;
}

/* --- Section des pictos "features" --- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 40px;
    max-width: 100%;
    margin: 0 auto;
}

.feature {
    text-align: center;
    padding: 20px;
}

.feature img {
    height: 9rem;
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 30px;
    margin-bottom: 10px;
}

.feature p {
    font-size: 24px;
}

/* --- Footer --- */
footer {
    background-color: #000;
    color: #fff;
    padding: 40px 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Ajout d'un petit gap pour l'espacement */
    margin-bottom: 20px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 16px;
    font-family: Raleway, sans-serif;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 14px;
    color: #777;
}

/* ==========================================================================
   3. COMPOSANTS SPÉCIFIQUES ET RÉUTILISABLES
   ========================================================================== */

/* --- Titre de Page (H1 avec lignes) --- */
.page-header h1 {
    text-align: center;
    color: #000;
    font-size: 2rem;
    margin: 2rem 0 4rem 0;
    position: relative;
    padding: 1.5rem 0;
}

.page-header h1::before,
.page-header h1::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #000;
}

.page-header h1::before { 
    top: 0; 
    box-shadow: 0 4px 0 0 #000;
}
.page-header h1::after { 
    bottom: 0; 
    box-shadow: 0 4px 0 0 #000;
}

/* --- Grille des Tableaux --- */
.tableaux-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    justify-content: center;
}

.artwork-thumbnail {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.artwork-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.artwork-thumbnail img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: fill;
    margin-bottom: 8px;
    border: 1px solid #eee;
}

.artwork-thumbnail p {
    font-size: 0.9rem;
    font-weight: bold;
    margin: 0;
}

/* --- Bouton Favori (Cœur) --- */
.favorite-button {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
    z-index: 5;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.favorite-button:hover {
    transform: scale(1.1);
}

.favorite-button.active .fa-heart {
    color: red;
}

.favorite-button .fas.fa-heart { display: none; }
.favorite-button .far.fa-heart { display: inline-block; }
.favorite-button.active .fas.fa-heart { display: inline-block; }
.favorite-button.active .far.fa-heart { display: none; }

.favorite-count {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    position: relative;
    top: -8px;
    left: -5px;
    display: none;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* --- Boutons d'action (produit, commande) --- */
.product-button {
    font-family: 'Raleway', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
    background-color: #000;
    text-shadow:3px 1px 1px rgba(0,0,0,1);
}

.product-button:hover {
    background-color: #000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* --- Page d'accueil (Index) --- */
.salon-image img {
    width: 100%;
    object-fit: fill;
    margin: 4rem 0;
}

/* ==========================================================================
   4. STYLES SPÉCIFIQUES AUX PAGES
   ========================================================================== */
   
/* --- Page Histoire --- */
.history-container {
    max-width: 100%; /* Limite la largeur du contenu */
    margin: 4rem auto;   /* Centre le conteneur horizontalement */
}

.history-container .history-text {
    padding: 0 20px;
    box-sizing: border-box;
}

.creator-presentation {
    display: flex;
    flex-wrap: wrap; /* Ajout pour la responsivité */
    gap: 40px;
    align-items: flex-start;
    padding: 0 20px;     /* Ajoute un peu d'air sur les côtés pour les petits écrans */
}

.creator-photo {
    flex: 1 1 300px; /* Flex-basis pour la responsivité */
}

.creator-photo img {
    width: 100%;
    border-radius: 8px;
}

.history-text {
    flex: 2 1 500px; /* Prend plus de place */
    font-size: 1.5rem;
    line-height: 1.7;
    font-weight: 400; /* 'highlight' est maintenant la norme */
}

.history-text-fullwidth {
    font-size: 1.5rem;
    line-height: 1.7;
    font-weight: 400;
}

.signature {
    text-align: left;
    margin-top: 3rem;
}

/* --- Page Nos Tableaux --- */
.tableaux-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 2rem auto;
    padding: 0 2%;
    max-width: 1400px;
    align-items: center;
    justify-content: center;
}

.main-artwork-display {
    flex: 1 1 500px;
    min-width: 300px;
    max-width: 600px;
}

.artwork-description {
    flex: 1 1 400px;
    padding-left: 0;
    font-size: 1.7rem;
    line-height: 1.6;
    min-width: 280px;
    text-align: center;
    font-weight: 400;
}

.tableaux-grid-container {
    text-align: center;
    margin: 3rem auto;
    padding: 0 5%;
    max-width: 60%;
}

.grid-intro-text, .grid-clarification-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
    font-weight: bold;
}

.grid-clarification-text {
    margin-top: 1rem;
    font-style: italic;
}

/* Slider de comparaison */
.image-comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border: 2px solid #333;
    overflow: visible;
}

.image-comparison-slider img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: fill;
}

.image-comparison-slider .image-wrapper-after {
    position: absolute;
    top: 0; right: 0;
    width: 100%; height: 100%;
    clip-path: inset(0 0 0 50%);
    z-index: 1;
}

.image-comparison-slider .slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: ew-resize;
    z-index: 3;
    margin: 0;
}

.image-comparison-slider .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0; /* Totalement transparent */
    height: 0;
}

.slider-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 3px dashed #000;
    pointer-events: none;
    z-index: 2;
    left: 50%;
    transform: translateX(-50%);
}

.slider-divider::before,
.slider-divider::after {
    content: "↔";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #000;
    font-size: 18px;
    font-weight: bold;
    background: #D9D7D2;
    line-height: 1;
    padding: 0;
    border-radius: 3px;
}
.slider-divider::before { top: -20px; }
.slider-divider::after { bottom: -20px; }


/* --- Page Produit --- */
.product-details-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 2rem auto;
    align-items: flex-start;
}

.product-display-area {
    flex: 1 1 500px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-image-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    border: 2px solid #333;
    margin-bottom: 1rem;
}

.product-image-container img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: fill;
    display: block;
}

.product-color-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.product-color-thumbnails .color-thumbnail {
    width: 100px;
    height: 100px;
    border: 1px solid #ccc;
    object-fit: fill;
    cursor: pointer;
}

.product-info-area {
    flex: 1 1 400px;
    min-width: 280px;
    padding-left: 20px;
}

.product-info-area #product-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.product-info-area .product-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 1.5rem;
    font-family: Raleway, sans-serif;
    white-space: pre-line;
}

.product-info-area .product-edition {
    font-size: 1.8rem;
    font-weight: 400;
    color: #000;
    font-family: Raleway, sans-serif;
}

.product-info-area .product-description-text {
    font-size: 1.6rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 400;
    font-style: italic;
}

.product-info-area .product-customization-text {
    font-size: 1.6rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.product-nav-btn {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 2rem;
    z-index: 10;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-radius: 30px;
    left: 50%;
    transform: translateX(-50%);
}
.product-nav-btn:hover {
    background-color: #000;
    transform: translateX(-50%) scale(1.05);
}
.product-nav-btn.nav-up { top: 5px; }
.product-nav-btn.nav-down { bottom: 5px; }

/* --- Page Carnet de Commande (Styles pour la maquette) --- */
.order-form-section .order-form {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
}

.order-form .form-header p {
    font-weight: bold;
    text-align: left;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.order-form .color-choice-options {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    font-weight: bold;
}

.order-layout-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.form-fields-column {
    flex: 2; /* Prend 2/3 de l'espace */
    min-width: 0;
}

.image-preview-column {
    flex: 1; /* Prend 1/3 de l'espace */
    min-width: 300px;
}

.image-preview-column .artwork-preview img {
    width: 100%;
    height: auto;
    border: 2px solid black;
}

.color-zones-selection {
    text-align: left;
    margin-top: 1.5rem;
}

.color-zones-selection p {
    font-weight: bold;
    margin-bottom: 1rem;
}

.color-zone-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.address-group {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.address-group.full-width {
    width: 100%;
}

.address-group .postal-code-input {
    flex: 1;
}
.address-group .city-input {
    flex: 2;
}
.address-group .city-label {
    margin-bottom: 0; /* Aligner le label */
}

.price-display {
    text-align: left;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 1rem 0 2rem 0;
    white-space: pre-line;
}

.confirmation-section {
    text-align: left;
    margin-top: 2rem;
    font-weight: bold;
}

.confirmation-text {
    margin-bottom: 1rem;
    font-style: italic;
    color: #555;
}

.checkbox-container {
    display: block;
    margin-bottom: 0.5rem;
}

.order-button {
    display: block;
    margin: 2rem auto 0 auto;
    width: fit-content;
}

/* --- Styles pour la personnalisation des couleurs (commande.html) --- */

/* Sélecteur de zone de couleur interactif */
.color-picker-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    background-color: #f9f9f9;
}
.color-picker-trigger:hover {
    background-color: #efefef;
}
.color-picker-trigger span {
    font-weight: bold;
}
.color-preview {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #888;
}

/* Conteneur pour le SVG */
#command-artwork-preview {
    width: 100%;
    height: auto;
    border: 2px solid black;
}

/* Assure que le SVG à l'intérieur s'adapte */
#command-artwork-preview svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Fenêtre Modale pour le choix des couleurs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background-color: #D9D7D2;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-content h3 {
    margin-top: 0;
}

/* Grille des pastilles de couleur */
.swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin: 20px 0;
    max-height: 50vh;
    overflow-y: auto;
    padding: 10px;
}
.color-swatch {
    cursor: pointer;
    text-align: center;
}
.color-swatch .swatch-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ddd;
    margin: 0 auto 5px;
    transition: transform 0.2s;
}
.color-swatch:hover .swatch-circle {
    transform: scale(1.1);
    border-color: #000;
}
.color-swatch .swatch-label {
    font-size: 0.8rem;
    font-family: Raleway, sans-serif;
}
/* --- Page Carnet de Commande & Formulaire --- */
.order-book-section,
.order-form-section {
    text-align: center;
    max-width: 100%;
    margin: 3rem auto;
}

.order-book-functionnement {
    max-width: 80%;
    margin: 0 auto 2rem auto;
    text-align: left;
}

.order-book-functionnement h3{
    text-decoration: underline;
    font-size: 1.5rem;
}

.order-book-functionnement p{
    font-size: 1.7rem;
}

/* --- Page Favoris --- */
.no-favorites-message {
    font-family: 'Raleway', sans-serif;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    color: #666;
    margin: 50px 0;
}

.favorites-display-section .tableaux-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-bottom: 50px;
    justify-items: center;
}

/* --- Page Contact --- */
.honeypot-field {
    position: absolute;
    left: -9999px; /* Déplace le champ en dehors de l'écran */
    opacity: 0; /* Assure qu'il est complètement invisible */
    pointer-events: none; /* Empêche toute interaction de la souris */
    height: 0;
    overflow: hidden;
}

/* Pour le label du honeypot (si vous voulez qu'il soit aussi masqué pour les lecteurs d'écran) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
/* Styles pour les messages de succès/erreur du formulaire */
.form-messages {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.form-messages.success {
    background-color: #d4edda; /* Vert pâle */
    color: #155724; /* Vert foncé */
    border: 1px solid #c3e6cb;
}

.form-messages.error {
    background-color: #f8d7da; /* Rouge pâle */
    color: #721c24; /* Rouge foncé */
    border: 1px solid #f5c6cb;
}
.contact-form-section {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.contact-container {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    max-width: 800px;
    width: 100%;
    padding: 40px;
    box-sizing: border-box;
}

.contact-intro {
    text-align: center;
    font-size: 1.5em;
    color: #666;
    margin-bottom: 30px;
}

#contact-product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
}

#contact-product-info img {
    width: 150px;
    height: auto;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    border-radius: 4px;
}

#contact-product-info p {
    margin: 0;
    line-height: 1.4;
}

.contact-form {
    width: 100%;
}
#message { 
    resize: none;
}
.captcha-group {
    margin-bottom: 20px;
}

.captcha-display {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px 15px;
}

#captcha-question {
    font-weight: bold;
    font-size: 1.1em;
}

#captcha-response {
    flex-grow: 1;
    max-width: 150px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    margin: 25px 0 30px;
    gap: 10px; /* Ajoute un gap au lieu du margin-right */
}

.checkbox-group input[type="checkbox"] {
    transform: scale(1.2);
    margin-top: 3px; /* Petit décalage pour compenser le scale */
    flex-shrink: 0;
}

.checkbox-group label {
    font-weight: normal;
    color: #555;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.checkbox-group label a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

.required-fields-note {
    text-align: center;
    font-size: 0.9em;
    color: #777;
    margin-top: 15px;
}

/* --- Bannière Cookie --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    display: none;
    z-index: 1000;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cookie-content p {
    margin-bottom: 15px;
    text-align: center;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cookie-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    background-color: #000;
    color: white;
}

.cookie-link {
    color: #000;
    text-decoration: none;
}

/* ==========================================================================
   5. MEDIA QUERIES (STYLES RESPONSIVES)
   ========================================================================== */

/* --- Grands écrans --- */
@media (max-width: 1200px) {
    .main-container {
        padding: 0 40px;
    }
}

/* --- Tablettes et ordinateurs portables (992px) --- */
@media (max-width: 992px) {
    .main-container {
        padding: 0 30px;
    }

    .main-logo {
        max-height: 20rem;
    }

    .quick-link a {
        font-size: 1.8rem;
    }

    .creator-presentation,
    .tableaux-showcase,
    .product-details-section,
    .order-layout-container {
        flex-direction: column;
        align-items: center;
    }

    .artwork-description,
    .product-info-area,
    .history-text {
        padding-left: 0;
        margin-top: 30px;
        text-align: center;
        max-width: 90%;
    }

    .order-layout-container .image-preview-column {
        order: -1;
        width: 100%;
        max-width: 400px;
        margin-bottom: 2rem;
        min-width: 0;
    }
     .order-layout-container .form-fields-column {
        width: 100%;
        max-width: 600px;
    }

    .product-details-section .product-display-area {
        min-width: 0;
    }
    .tableaux-showcase {
        flex-direction: column;
        align-items: center;
    }

    .main-artwork-display {
        max-width: 500px;
        width: 100%;
    }

    .artwork-description {
        padding-left: 0;
        margin-top: 20px;
    }
}

/* --- Tablettes portrait (768px) --- */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .main-container {
        padding: 0 20px;
    }

    .header-top {
        padding: 1rem 2rem;
    }

    .main-logo {
        max-height: 15rem;
    }
    .quick-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .quick-link a {
        font-size: 1.5rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0;
    }
    .feature h3 {
        font-size: 1.5rem;
    }

    .order-form .color-choice-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tableaux-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }

    .product-nav-btn {
        font-size: 1.5rem;
        padding: 8px 12px;
    }
    
    .contact-container {
        padding: 20px;
    }
    .tableaux-grid-container {
        max-width: 90%;
    }

    .grid-intro-text {
        font-size: 1rem;
    }

    .artwork-description p {
        font-size: 1rem;
    }
    .main-artwork-display {
        max-width: 90%;
        min-width: 0px;
        flex: 1 1 0;
    }
}

/* --- Grands téléphones (576px) --- */
@media (max-width: 576px) {
    .main-logo {
        max-height: 12rem;
    }
    
    .header-main h2 {
        font-size: 1.2rem;
    }

    .header-main p {
        font-size: 1.3rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .artwork-description,
    .history-text,
    .history-text-fullwidth {
        font-size: 1.1rem;
    }

    .tableaux-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }
    .tableaux-showcase {
        padding: 0 2%; /* Réduire le padding horizontal */
    }
    .product-info-area #product-title {
        font-size: 2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    .main-artwork-display {
        max-width: 100%;
        margin: 0 auto; /* Ajouter cette ligne */
    }

    .artwork-description {
        width: 100%; /* Ajouter cette ligne */
        margin: 0 auto; /* Ajouter cette ligne */
    }

    .slider-divider::before,
    .slider-divider::after {
        font-size: 14px;
    }
}

/* --- Petits téléphones (480px) --- */
@media (max-width: 480px) {
    .main-container {
        padding: 0 15px;
    }

    .header-top {
        padding: 1rem 1rem;
    }
    .main-nav ul {
        gap: 15px;
    }
    .main-nav a {
        font-size: 1.2rem;
    }
    .main-logo {
        max-height: 10rem;
    }

    .header-main h2 {
        font-size: 1.1rem;
    }
    .header-main p {
        font-size: 1.1rem;
    }

    .quick-link a {
        font-size: 1.2rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
        margin: 1.5rem 0 2.5rem 0;
        padding: 1rem 0;
    }

    .order-form-section .order-form {
        padding: 1.5rem 1rem;
    }

    .modal-content {
        padding: 20px;
    }

    .swatch-grid {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
        gap: 10px;
    }

    .product-info-area #product-title {
        font-size: 1.8rem;
    }
    .product-info-area .product-price {
        font-size: 1.4rem;
    }
    .product-info-area .product-description-text,
    .product-button {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .cookie-content {
        align-items: stretch;
        text-align: center;
    }
    .cookie-buttons {
       flex-direction: column;
    }
    .cookie-btn {
        width: 100%;
    }
}

/* ==========================================================================
   6. MEDIA QUERIES SPÉCIFIQUES À L'ORIENTATION (PAYSAGE)
   ========================================================================== */

@media (orientation: landscape) and (max-height: 500px) {
    /* Optimisation générale pour le mode paysage */
    header {
        padding: 10px 0;
    }
    .main-logo {
        max-height: 8rem;
    }
    .page-header h1 {
        font-size: 1.5rem;
        margin: 1rem 0 1.5rem 0;
        padding: 0.5rem 0;
    }

    /* 1. Aligner les liens rapides */
    .quick-links {
        flex-direction: row;
        justify-content: center;
        gap: auto;
    }
    .quick-link a {
        font-size: 1rem;
    }

    /* 2. Aligner les icônes de fin de page */
    .features {
        grid-template-columns: repeat(4, 1fr);
        padding: 20px 0;
        gap: 0px;
        max-width: auto;
    }
    .feature{
        padding: 0%;
    }
    .feature img {
        height: 5rem;
    }
    .feature h3 {
        font-size: small;
    }

    /* 3. Mise en page en grille pour commande.html et produit.html */
    .order-layout-container {
        margin-bottom: 100px;
    }
    .order-layout-container,
    .product-details-section {
        display: grid;
        grid-template-columns: 45% 1fr;
        gap: 20px;
        height: auto; /* au lieu de 90vh */
        margin-top: 1rem;
        align-items: start;
    }
    
    /* Colonne de gauche (Image) */
    .image-preview-column,
    .product-display-area {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
    }

    /* Colonne de droite (Contenu) */
    .form-fields-column,
    .product-info-area {
        height: auto; /* au lieu de 90vh */
        min-height: 0;
    }

    /* --- Spécifique à commande.html --- */
    /* Retrait du menu déroulant et intégration propre */
    .form-fields-column .form-group {
        margin-bottom: 0.8rem;
    }
    .color-choice-options {
        flex-direction: column;
        gap: 0.5rem !important;
        margin-bottom: 1rem;
    }

    /* --- Spécifique à produit.html --- */
    .product-image-container {
        border: none; /* Retrait du cadre fixe */
        height: 90vh;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .product-image-container img {
        object-fit: contain; /* L'image s'adapte sans être déformée */
        max-height: 100%;
        max-width: 100%;
        width: auto;
        height: auto;
        border: 2px solid #333; /* Le cadre est maintenant sur l'image */
    }
    .product-color-thumbnails {
        height: auto; /* au lieu de 20% */
        max-height: 20%;
        flex-wrap: wrap; /* au lieu de wrap */
        /*overflow-x: auto;*/
        gap: 5px;
    }
    .color-thumbnail {
        height: 80px !important; /* Taille fixe */
        width: 80px !important;
        flex-shrink: 0;
    }
    .tableaux-showcase {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: center;
        height: auto;
    }

    .main-artwork-display {
        max-width: 50%;
    }

    .artwork-description p {
        font-size: 1rem;
    }
    .artwork-description {
        max-height: 200px;
    }

    /*.product-nav-btn {
        top: 50%;
        transform: translateY(-50%);
        left: auto;
        right: auto;
        bottom: auto; /* Ajouter cette ligne importante 
    }
    .product-nav-btn.nav-up {
        left: 15px;
    }
    .product-nav-btn.nav-down {
        right: 15px;
    }
    /* Supprimer les lignes avec transform: translateY(-50%); en double */
}

/* --- Présentation artiste --- */

.artist-intro {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    max-width: 1200px;
    margin: 4rem auto;
}

.artist-photo {
    flex: 0 0 48%;
}

.artist-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.artist-text {
    flex: 1;
    font-size: 1.2rem;
    line-height: 1.7;
}

.artist-text p {
    margin: 0 0 1.5rem 0;
}

@media (max-width: 768px) {
    .artist-intro {
        flex-direction: column;
        gap: 30px;
    }

    .artist-photo {
        flex: none;
        width: 100%;
    }

    .artist-text {
        width: 100%;
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   VISIONNEUSE DES IMAGES
   ========================================================================== */

.image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background-color: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
}

.image-lightbox.active {
    display: flex;
}

.lightbox-image-container {
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    z-index: 5001;
}

.lightbox-arrow:hover {
    opacity: 0.7;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 5001;
}

.lightbox-close:hover {
    opacity: 0.7;
}

@media (max-width: 576px) {
    .lightbox-image-container {
        width: 85vw;
        height: 80vh;
    }

    .lightbox-arrow {
        font-size: 2rem;
        padding: 10px;
    }

    .lightbox-prev {
        left: 0;
    }

    .lightbox-next {
        right: 0;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 0.85rem;
    }
}

.anecdote {
    width: 80%;
    margin: 3rem auto 4rem auto;
    text-align: center !important;
    font-size: 1.5rem !important;
    line-height: 1.7;
}

.availability-text {
    font-weight: 400;
}