/* =========================================
   SAV_ST_JEAN - DESIGN SYSTEM
   ========================================= */
:root {
    --rouge-destock: #e63946;
    --bleu-fonce: #1d3557;
    --vert-publier: #2a9d8f;
    --vert-dispo: #2e7d32; /* Ajouté pour l'étiquette */
    --gris-leger: #f4f4f4;
    --fond-image: #ffffff; /* CORRIGÉ : Blanc pur pour ne plus voir de gris autour des photos */
}

/* =========================================
   BASE
   ========================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: var(--gris-leger);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   HEADER & NAVIGATION - SAV_ST_JEAN
   ========================================= */
.site-header {
    background: #ffffff;
    border-bottom: 5px solid var(--rouge-destock);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-logo {
    height: 80px;
    width: auto;
    display: block;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

.main-nav a {
    text-decoration: none;
    color: var(--bleu-fonce);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--rouge-destock);
}

/* BLOC TÉLÉPHONE */
.phone-link {
    text-decoration: none;
    background: var(--bleu-fonce);
    padding: 10px 20px;
    border-radius: 12px;
    text-align: center;
    display: block;
    min-width: 160px;
    flex-shrink: 0;
    transition: background 0.3s;
}

.phone-link:hover {
    background: var(--rouge-destock);
}

.phone-number { 
    color: #fff; 
    font-weight: 800; 
    display: block; 
    font-size: 1.1rem;
    white-space: nowrap;
}

.phone-btn { 
    color: rgba(255,255,255,0.9); 
    font-size: 0.7rem; 
    font-weight: bold;
    display: block;
    text-transform: uppercase;
}

/* =========================================
   GRILLE DYNAMIQUE
   ========================================= */
.product-grid, .admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 30px 0;
}

/* =========================================
   MODULES (ADMIN & INDEX)
   ========================================= */
.product-card, .upload-slot {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.image-container, .preview-area {
    height: 200px;
    background-color: var(--fond-image) !important; /* FORCÉ BLANC */
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #f0f0f0; /* Léger contour pour définir la zone */
}

.image-container img, .preview-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #ffffff;
}

/* --- ÉTIQUETTE DISPONIBLE (VERTE) --- */
.status-badge {
    display: inline-block;
    background: #e8f5e9; 
    color: var(--vert-dispo);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid #c8e6c9;
    margin-bottom: 10px;
    align-self: flex-start;
}

/* --- BOUTONS ADMIN --- */
.btn-suppr {
    background: var(--rouge-destock);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

.btn-publier-unique {
    background: var(--vert-publier);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    text-transform: uppercase;
}

/* =========================================
   ARTICLE À LA UNE (HERO) - VERSION BOOSTÉE
   ========================================= */
.hero-card {
    display: flex;
    background: white;
    border-radius: 30px; /* Plus arrondi pour le côté moderne */
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(29, 53, 87, 0.15); /* Ombre plus profonde bleuie */
    border: none; /* On enlève la bordure simple */
    margin: 40px 0 60px 0;
    position: relative;
    background: linear-gradient(to right, #ffffff 50%, #f8f9fa 100%);
}

/* Effet de bordure lumineuse sur le côté */
.hero-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 8px;
    background: var(--rouge-destock);
}

.hero-image { 
    flex: 1.2; 
    height: 450px; 
    position: relative; 
    padding: 20px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    transition: transform 0.5s ease;
}

.hero-card:hover .hero-image img {
    transform: scale(1.05); /* Petit zoom au survol */
}

.hero-info { 
    flex: 1; 
    padding: 50px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    border-left: 1px solid #eee;
}

/* Badge "À LA UNE" plus stylé */
.hero-info .badge-une {
    background: var(--rouge-destock);
    color: white;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 20px;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}

.hero-info h2 {
    font-size: 1.2rem;
    color: var(--rouge-destock);
    text-transform: uppercase;
    margin: 0;
    font-weight: 800;
}

.hero-info h3 {
    font-size: 2.5rem;
    color: var(--bleu-fonce);
    line-height: 1.2;
    margin: 10px 0 20px 0;
    font-weight: 900;
}

.hero-info p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}

.hero-price {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--bleu-fonce);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-price span { font-size: 1.5rem; }

/* Responsive */
@media (max-width: 850px) {
    .hero-card { flex-direction: column; }
    .hero-image { height: 300px; }
    .hero-info { padding: 30px; text-align: center; border-left: none; border-top: 1px solid #eee; }
    .hero-info .badge-une { align-self: center; }
}

/* =========================================
   VENDU ET BADGES
   ========================================= */
.badge-vendu {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--rouge-destock); /* Passé en Rouge pour cohérence */
    color: white;
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 5px;
    z-index: 10;
}

.sold-style { opacity: 0.7; filter: grayscale(0.6); }
.sold-style .image-container { background: #ffffff !important; }

/* =========================================
    FOOTER - SAV_ST_JEAN
   ========================================= */
.main-footer { 
    background: var(--bleu-fonce); 
    color: white; 
    padding: 60px 0 20px 0; 
    margin-top: 80px; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
    margin-bottom: 40px;
    text-align: center; /* Centre le texte à l'intérieur des colonnes */
    align-items: start; /* Garde les titres bien alignés en haut */
}

.footer-column h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--rouge-destock); 
    padding-bottom: 10px;
    display: inline-block; /* Important : la ligne rouge s'adapte à la largeur du mot */
}

.footer-column p, .footer-column li {
    color: #bdc3c7; 
    line-height: 1.6;
    list-style: none;
    max-width: 320px; /* Évite que le texte ne s'étale trop sur grands écrans */
    margin: 0 auto 10px auto; /* Centre le bloc de texte horizontalement */
}

.footer-column a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--rouge-destock);
}

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

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .product-grid, .admin-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-flex, .hero-card { flex-direction: column; }
    .product-grid, .admin-grid { grid-template-columns: 1fr; }
    .hero-image { height: 250px; }
    .main-nav ul { margin-top: 15px; gap: 10px; flex-wrap: wrap; justify-content: center; }

}
/* Aligne les colonnes du footer par le haut */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    align-items: start; /* Force l'alignement en haut */
}

.footer-column h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--rouge-destock);
    display: inline-block;
    padding-bottom: 5px;
}

/* Style spécifique pour les horaires dynamiques */
#footer-horaires p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}
/* Fix pour l'API obsolète H1UserAgent */
h1 {
    font-size: 2rem; /* Ou la taille que tu souhaites */
}

/* Assure-toi aussi que tes articles ne réinitialisent pas la taille */
section h1, article h1 {
    font-size: 2.5rem; 
}
/* On prépare une zone de 500px de haut pour le Hero */
#hero-container {
    min-height: 500px; 
    display: flex;
    background: #f9f9f9; /* Un fond léger pour éviter le flash blanc */
}

/* On force aussi la taille du titre pour qu'il ne décale pas tout */
.hero-info h1 {
    min-height: 1.2em;
    margin: 10px 0;
}

/* On bloque la taille des images de la galerie pour éviter le saut */
.image-container {
    aspect-ratio: 300 / 250;
    background: #eee;
}