/* --- REINITIALISATION ET BASES --- */
* {
    box-sizing: border-box;
}

body {
    background-color: #f4f4f9;
    color: #333333;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- EN-TÊTE AVEC GRANDE BANNIÈRE PHOTO D'ORIGINE --- */
.main-header {
    background-color: #1a1a1a;
    color: #ffffff;
}

.header-banner {
    position: relative;
    width: 100%;
    padding: 50px 20px;
    background-image: url('img/equipe.jpg');
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.header-content h1,
.site-title {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
}

/* --- NAVIGATION NOIRE AVEC LIGNE ORANGE D'ORIGINE --- */
.main-nav, nav {
    background-color: #1a1a1a;
    border-top: 3px solid #f3a640;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.main-nav ul, nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-nav a, nav a {
    display: block;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 1rem;
    padding: 16px 10px;
    transition: all 0.2s ease;
}

.main-nav a:hover, nav a:hover {
    color: #f3a640;
}

/* --- CONTENU PRINCIPAL --- */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
}

.card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- SECTIONS ACCUEIL --- */
.home-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.home-section {
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.home-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    margin-bottom: 14px;
}

.news-date {
    font-size: 0.75rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-item h3 {
    margin: 3px 0 4px 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.news-item p {
    margin: 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
}

.event-highlight {
    background-color: #fff8ee;
    padding: 18px 20px;
    border-radius: 6px;
    border-bottom: none;
}

.event-label {
    display: inline-block;
    background-color: #f3a640;
    color: #1a1a1a;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.event-highlight h2 {
    font-size: 1.05rem;
    margin: 0 0 6px 0;
}

.event-date {
    font-weight: 600;
    color: #d90429;
    font-size: 0.85rem;
}

.event-highlight p {
    font-size: 0.88rem;
    color: #555;
}

.btn-link {
    display: inline-block;
    margin-top: 8px;
    color: #d90429;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.carousel-section,
.weather-section,
.sdis-section {
    grid-column: span 2;
    border-bottom: none;
}

/* --- FORMULAIRES --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

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

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.form-checkbox input {
    width: auto;
}

button.btn-submit {
    background-color: #d90429;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button.btn-submit:hover {
    background-color: #b00220;
}

.rgpd-notice {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* --- BANDEAU COOKIES --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-size: 0.9rem;
}

.cookie-banner button {
    background-color: #d90429;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 15px;
}

.cookie-banner button:hover {
    background-color: #b00220;
}

/* --- FOOTER GRIS/NOIR D'ORIGINE --- */
footer, .footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding-top: 30px;
    margin-top: 50px;
    border-top: 4px solid #f3a640;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px 20px 20px;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 220px;
}

.footer-section h3 {
    color: #f3a640;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section p, 
.footer-section li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #d90429;
    text-decoration: underline;
}

.emergency-number {
    font-weight: bold;
    color: #d90429 !important;
    font-size: 1.1rem !important;
}

.footer-section iframe {
    width: 100%;
    height: 180px;
    border-radius: 4px;
    margin: 10px 0;
}

.footer-bottom {
    background-color: #111111;
    text-align: center;
    padding: 15px 10px;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid #282828;
}

.legal-links {
    margin-top: 8px;
}

.legal-links a {
    color: #aaa;
    margin: 0 10px;
    text-decoration: none;
}

.legal-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- CARROUSEL --- */
.carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 500px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    background-color: #1a1a1a;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: #d90429;
}

/* --- BOUTIQUE : CATALOGUE & PANIER --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.product-img {
    width: 100%;
    height: 160px;
    background-color: #1a1a1a;
    color: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding: 5px;
    overflow: hidden;
}

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

.product-card h3 {
    font-size: 0.95rem;
    margin: 5px 0;
}

.product-price {
    font-weight: bold;
    color: #d90429;
    font-size: 1.1rem;
    margin: 5px 0 10px 0;
}

.btn-add {
    width: 100%;
    padding: 8px;
    font-size: 0.85rem;
}

.cart-empty {
    color: #888;
    font-style: italic;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-name {
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-controls button {
    width: 26px;
    height: 26px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.cart-item-price {
    font-weight: bold;
    color: #d90429;
    font-size: 0.9rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
}

.cart-item-remove:hover {
    color: #d90429;
}

.cart-total {
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #d90429;
}

/* --- METEO --- */
.weather-box {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 18px;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.weather-temp {
    font-size: 2rem;
    font-weight: bold;
    color: #d90429;
    margin: 5px 0;
}

.weather-desc {
    font-size: 0.9rem;
    color: #555;
    text-transform: capitalize;
}

.weather-icon {
    font-size: 2.4rem;
}

/* --- CORRECTIONS RESPONSIVES POUR MOBILE --- */
@media (max-width: 768px) {
    /* 1. Empêcher les formulaires et boutons de dépasser de l'écran */
    form input, 
    form select, 
    form textarea, 
    form button, 
    .btn-submit {
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 2. Rendre les champs Nom / Prénom empilés verticalement sur mobile */
    .form-row, .form-group-inline {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* 3. Ajuster proprement le menu de navigation */
    .main-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }

    /* 4. S'assurer que les cartes principales s'adaptent bien */
    .card {
        padding: 15px !important;
        margin: 10px !important;
    }
}

/* --- CONTENEUR RESPONSIVE PROPRE POUR LES TABLEAUX --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    /* Ajustement des boutons à l'intérieur du conteneur de tableau si besoin */
    .table-responsive table td:last-child a {
        display: flex !important;
        justify-content: center;
        width: 100% !important;
        box-sizing: border-box;
    }
}