/*
Theme Name: AnnuaireMada Child
Theme URI: http://annuairemada.local
Description: Thème enfant pour AnnuaireMada - Permet de personnaliser sans toucher au parent
Author: Tiavina Randrianarivo
Author URI: http://annuairemada.local
Template: mon-theme-perso
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: annuairemada-child
*/

/* ========================================
   1. SURCHARGES DE BASE (Desktop)
   ======================================== */

/* Couleurs principales du thème */
header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

nav {
    background: rgba(240, 147, 251, 0.3);
}

footer {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-rechercher {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.restaurant-card {
    border-radius: 20px;
    border: 2px solid #f093fb;
}

.btn-voir {
    color: #f5576c;
    font-weight: 700;
}

.btn-voir:hover {
    color: #f093fb;
}

/* Bandeau de bienvenue */
.welcome-banner {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    margin: 1rem auto;
    max-width: 800px;
}

/* ========================================
   2. PAGE RESTAURANT (Desktop)
   ======================================== */

/* Header du restaurant */
.restaurant-single-header {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.restaurant-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.restaurant-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.restaurant-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.95) 100%);
    z-index: 2;
}

.restaurant-info-overlay h1 {
    color: white !important;
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    border: none;
}

/* Meta header (quartier, cuisine, prix) */
.restaurant-meta-header {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.meta-item {
    background: rgba(255,255,255,0.25);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    color: white;
}

.prix-display {
    background: #ffd700 !important;
    color: #2d3748 !important;
    font-weight: 700;
    letter-spacing: 2px;
}

.restaurant-rating-display {
    color: #ffd700 !important;
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.restaurant-rating-display span {
    color: white !important;
    font-size: 1rem;
}

/* Layout 2 colonnes */
.restaurant-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Sections principales */
.restaurant-main section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.restaurant-main h2 {
    color: #2d3748;
    border-bottom: 3px solid #f093fb;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Images */
.entry-content,
.photo-main {
    overflow: hidden;
}

.entry-content img,
.photo-main img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Sidebar */
.restaurant-sidebar .info-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.restaurant-sidebar h3 {
    color: #f093fb;
    margin-bottom: 1rem;
}

.info-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-item strong {
    display: block;
    color: #2d3748;
    margin-bottom: 0.3rem;
}

.info-item p,
.info-item a {
    color: #4a5568;
    word-break: break-word;
}

/* Téléphone */
.restaurant-telephone {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    font-weight: 600;
    color: #f5576c;
    text-decoration: none;
}

.restaurant-telephone:hover {
    text-decoration: underline;
}

/* Horaires */
.horaires-display {
    white-space: pre-wrap;
    font-family: inherit;
    color: #4a5568;
    margin: 0;
    line-height: 1.6;
}

/* Carte */
#restaurant-map {
    height: 300px;
    border-radius: 8px;
}

.map-address {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: #4a5568;
    text-align: center;
}

/* Réseaux sociaux */
.restaurant-reseaux {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.social-link {
    flex: 1;
    text-align: center;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 140px;
}

.social-link.facebook {
    background: #1877f2;
    color: white;
}

.social-link.facebook:hover {
    background: #0d5bc4;
    transform: translateY(-2px);
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.social-link.instagram:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Commodités */
.commodites-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.commodites-section h2 {
    color: #2d3748;
    border-bottom: 3px solid #f093fb;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.restaurant-commodites {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.commodite-badge {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    color: #856404;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #ffc107;
}

/* Distance */
.distance-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin: 0.5rem 0;
}

/* Restaurants proches */
.restaurants-proches {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.restaurants-proches h2 {
    color: #2d3748;
    border-bottom: 3px solid #f093fb;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

/* ===== GALERIE PHOTOS ===== */

.gallery {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.gallery h2 {
    color: #2d3748;
    border-bottom: 3px solid #f093fb;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.gallery-main {
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-main-image:hover {
    transform: scale(1.02);
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.8rem;
}

.gallery-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.gallery-thumb:hover {
    transform: translateY(-3px);
    border-color: #f093fb;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

/* Lightbox (modal) */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10000;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 20px;
    border-radius: 8px;
    transition: background 0.3s;
}

.gallery-lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
}

.gallery-lightbox-prev {
    left: 20px;
}

.gallery-lightbox-next {
    right: 20px;
}

/* ========================================
   3. RESPONSIVE - TABLETTES & MOBILES (max 768px)
   ======================================== */

@media screen and (max-width: 768px) {
    
    /* === CORRECTIONS GÉNÉRALES MOBILE === */
    * {
        box-sizing: border-box;
    }
    
    body {
        font-size: 16px;
        overflow-x: hidden;
    }
    
    /* === HEADER GLOBAL === */
    header h1 a {
        font-size: 1.8rem !important;
    }
    
    /* === MENU === */
    .nav-menu {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu a {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    /* === HERO SECTION === */
    .homepage .hero {
        padding: 2rem 1rem !important;
    }
    
    .homepage .hero h1 {
        font-size: 1.8rem !important;
    }
    
    .homepage .hero p {
        font-size: 1rem !important;
    }
    
    /* === FORMULAIRE DE RECHERCHE === */
    .filtres-form {
        grid-template-columns: 1fr !important;
        gap: 0.8rem;
    }
    
    .bouton-groupe {
        flex-direction: column;
    }
    
    .btn-rechercher,
    .btn-reset {
        width: 100%;
        text-align: center;
    }
    
    /* === GRILLE DE RESTAURANTS === */
    .annuairemada-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .card-image img {
        height: 180px !important;
    }
    
    /* === PAGE RESTAURANT - LAYOUT === */
    .restaurant-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* === HEADER DU RESTAURANT === */
    .restaurant-single-header {
        height: 300px !important;
    }
    
    .restaurant-cover img {
        object-position: center 75% !important;
    }
    
    .restaurant-info-overlay {
        padding: 1.5rem 1rem !important;
    }
    
    .restaurant-info-overlay h1 {
        font-size: 1.5rem !important;
        line-height: 1.2;
        margin-bottom: 0.5rem !important;
    }
    
    .restaurant-meta-header {
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-top: 0.5rem;
        font-size: 0.95rem !important;
    }
    
    .meta-item {
        padding: 0.3rem 0.7rem !important;
        font-size: 0.85rem !important;
    }
    
    .restaurant-rating-display {
        font-size: 1.1rem !important;
        margin-top: 0.3rem;
    }
    
    .restaurant-rating-display span {
        font-size: 0.9rem;
    }
    
    /* === SECTIONS - CORRECTION DÉBORDEMENT === */
    .restaurant-main section {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem !important;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .restaurant-main h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* === TEXTE - WORD WRAP === */
    .entry-content,
    .entry-content p,
    .info-item p,
    .info-item a,
    .map-address {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto;
        max-width: 100%;
    }
    
    /* === IMAGES - CONTAINEMENT === */
    .entry-content img,
    .photo-main img,
    .gallery-main-image,
    .gallery-thumb {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .entry-content {
        overflow: hidden;
        width: 100%;
    }
    
    .entry-content img {
        object-fit: contain;
        margin: 0 auto;
        display: block;
    }
    
    /* === SIDEBAR === */
    .info-box {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem !important;
        width: 100%;
        max-width: 100%;
    }
    
    .info-box h3 {
        font-size: 1.2rem !important;
    }
    
    .info-item {
        margin-bottom: 1.2rem;
        padding-bottom: 1.2rem;
    }
    
    .info-item strong {
        font-size: 0.95rem;
    }
    
    .info-item p,
    .info-item a {
        font-size: 0.95rem;
    }
    
    .restaurant-telephone {
        font-size: 1rem !important;
    }
    
    /* === CARTE === */
    #restaurant-map {
        height: 320px !important;
        width: 100% !important;
        max-width: 100%;
    }
    
    .leaflet-popup-content-wrapper {
        max-width: 200px !important;
        font-size: 0.85rem !important;
    }
    
    .leaflet-popup-content {
        margin: 8px 12px !important;
        line-height: 1.3 !important;
    }
    
    /* === RÉSEAUX SOCIAUX === */
    .restaurant-reseaux {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .social-link {
        width: 100% !important;
        min-width: auto;
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    
    /* === COMMODITÉS === */
    .restaurant-commodites {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .commodite-badge {
        font-size: 0.9rem !important;
        padding: 0.6rem 1rem !important;
        margin: 0.2rem;
        white-space: nowrap;
    }
    
    /* === GALERIE PHOTOS === */
    .gallery {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem !important;
        width: 100%;
        max-width: 100%;
    }
    
    .gallery h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .gallery-main {
        margin-bottom: 0.8rem !important;
        width: 100%;
        overflow: hidden;
    }
    
    .gallery-main-image {
        height: auto !important;
        max-height: 400px !important;
        width: 100% !important;
        object-fit: contain !important;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        width: 100%;
    }
    
    .gallery-thumb {
        height: 100px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    .gallery-lightbox-nav {
        font-size: 30px !important;
        padding: 15px !important;
    }
    
    .gallery-lightbox-prev {
        left: 10px !important;
    }
    
    .gallery-lightbox-next {
        right: 10px !important;
    }
    
    .gallery-lightbox-close {
        top: 10px !important;
        right: 15px !important;
        font-size: 30px !important;
    }
    
    /* === RESTAURANTS PROCHES === */
    .restaurants-proches {
        padding: 0 1rem !important;
        margin: 2rem 0 !important;
        max-width: 100%;
    }
    
    .restaurants-proches h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .distance-badge {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    /* === ARCHIVES === */
    .archive-header h1 {
        font-size: 1.4rem !important;
    }
    
    .archive-filters {
        padding: 1rem !important;
    }
    
    .filter-btn {
        width: 100% !important;
        text-align: center;
    }
    
    /* === RECHERCHE === */
    .search-header h1 {
        font-size: 1.3rem !important;
    }
    
    /* === 404 === */
    .error-number {
        font-size: 4rem !important;
    }
    
    .error-404-page h1 {
        font-size: 1.4rem !important;
    }
    
    .error-message {
        font-size: 0.95rem !important;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100% !important;
    }
    
    /* === PAGINATION === */
    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* === FOOTER === */
    footer {
        padding: 1.5rem 1rem !important;
        font-size: 0.9rem;
    }
    
    /* === TACTILE === */
    h1, h2, h3 {
        line-height: 1.2;
    }
    
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px;
        padding: 12px;
    }
    
    button {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .nav-menu a,
    .btn-rechercher,
    .btn-reset,
    .btn-voir,
    .filter-btn,
    .social-link,
    .restaurant-card {
        min-height: 44px;
    }
}

/* ========================================
   4. RESPONSIVE - PETITS MOBILES (max 480px)
   ======================================== */

@media screen and (max-width: 480px) {
    
    header h1 a {
        font-size: 1.5rem !important;
    }
    
    .homepage .hero h1 {
        font-size: 1.4rem !important;
    }
    
    .homepage .hero p {
        font-size: 0.95rem !important;
    }
    
    .restaurant-single-header {
        height: 260px !important;
    }
    
    .restaurant-cover img {
        object-position: center 80% !important;
    }
    
    .restaurant-info-overlay h1 {
        font-size: 1.3rem !important;
    }
    
    .restaurant-info-overlay {
        padding: 1rem !important;
    }
    
    .restaurant-meta-header {
        font-size: 0.85rem !important;
    }
    
    .meta-item {
        font-size: 0.8rem !important;
        padding: 0.25rem 0.6rem !important;
    }
    
    .prix-display {
        font-size: 0.9rem !important;
    }
    
    .restaurant-main section {
        padding: 1.2rem 0.8rem !important;
    }
    
    .restaurant-main h2 {
        font-size: 1.2rem !important;
    }
    
    .entry-content {
        font-size: 0.95rem !important;
    }
    
    .entry-content p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    .info-box {
        padding: 1.2rem 0.8rem !important;
    }
    
    .info-item strong {
        font-size: 0.9rem !important;
    }
    
    .info-item p {
        font-size: 0.9rem !important;
    }
    
    #restaurant-map {
        height: 280px !important;
    }
    
    .commodite-badge {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem;
    }
    
    .btn-voir {
        font-size: 0.9rem !important;
        padding: 0.6rem 1rem;
    }
    
    .archive-header h1 {
        font-size: 1.3rem !important;
    }
    
    .search-header h1 {
        font-size: 1.2rem !important;
    }
    
    .error-number {
        font-size: 3.5rem !important;
    }
    
    .error-404-page h1 {
        font-size: 1.3rem !important;
    }
    
    /* Galerie petits mobiles */
    .gallery {
        padding: 1.2rem 0.8rem !important;
    }
    
    .gallery h2 {
        font-size: 1.2rem !important;
    }
    
    .gallery-main-image {
        max-height: 300px !important;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.4rem !important;
    }
    
    .gallery-thumb {
        height: 80px !important;
    }
}

/* ========================================
   5. RESPONSIVE - TRÈS PETITS MOBILES (max 360px)
   ======================================== */

@media screen and (max-width: 360px) {
    
    header h1 a {
        font-size: 1.3rem !important;
    }
    
    .homepage .hero h1 {
        font-size: 1.2rem !important;
    }
    
    .restaurant-info-overlay h1 {
        font-size: 1.1rem !important;
    }
    
    .card-content h3,
    .card-content h3 a {
        font-size: 1rem !important;
    }
    
    /* Galerie très petits mobiles */
    .gallery-main-image {
        height: 220px !important;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .gallery-thumb {
        height: 70px !important;
    }
}

/* Correction alignement formulaire recherche */
.annuairemada-filtres .filtres-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.annuairemada-filtres .filtre-groupe {
    flex: 1 1 200px;
    min-width: 200px;
}

.annuairemada-filtres .filtre-groupe input,
.annuairemada-filtres .filtre-groupe select {
    width: 100%;
    box-sizing: border-box;
}

.annuairemada-filtres .bouton-groupe {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
}

/* Mobile formulaire recherche */
@media screen and (max-width: 768px) {
    .annuairemada-filtres .filtre-groupe,
    .annuairemada-filtres .bouton-groupe {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .annuairemada-filtres .bouton-groupe {
        flex-direction: column;
    }
    
    .annuairemada-filtres .bouton-groupe button,
    .annuairemada-filtres .bouton-groupe a {
        width: 100%;
    }
}

/* ===== CORRECTION FINALE MOBILE - DÉBORDEMENT ===== */

@media screen and (max-width: 768px) {
    
    /* Empêcher tout débordement horizontal */
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Forcer tous les conteneurs à rester dans les limites */
    .restaurant-single,
    .restaurant-layout,
    .restaurant-main,
    .restaurant-main section,
    .entry-content,
    .gallery,
    .gallery-main,
    .info-box,
    .commodites-section,
    .restaurants-proches {
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Images - CONTENIR STRICTEMENT */
    .entry-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
        margin: 0 auto !important;
    }
    
    .gallery-main-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: 350px !important;
        object-fit: contain !important;
    }
    
    /* Texte - FORCER LE WRAP */
    .entry-content,
    .entry-content p,
    .restaurant-main section,
    .restaurant-main section p,
    .info-item p,
    .info-item a,
    .map-address,
    .horaires-display {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        word-break: break-word !important;
    }
    
    /* Padding réduit pour gagner de l'espace */
    .restaurant-main section {
        padding: 1rem 0.8rem !important;
    }
    
    .entry-content {
        padding: 0 !important;
    }
    
    /* Gallery */
    .gallery {
        padding: 1rem 0.8rem !important;
    }
    
    .gallery-main {
        margin-bottom: 0.5rem !important;
    }
    
    /* Sidebar */
    .info-box {
        padding: 1rem 0.8rem !important;
    }
    
    /* Commodités */
    .commodites-section {
        padding: 1rem 0.8rem !important;
    }
}

/* Petits mobiles */
@media screen and (max-width: 480px) {
    
    .restaurant-main section {
        padding: 0.8rem 0.6rem !important;
    }
    
    .gallery-main-image {
        max-height: 280px !important;
    }
    
    .entry-content img {
        max-height: 300px !important;
    }
}

/* ===== BOUTONS ITINÉRAIRE ===== */

.direction-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.direction-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.direction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-text {
    font-size: 0.95rem;
}

/* Google Maps - Rouge */
.direction-btn.google-maps {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
}

.direction-btn.google-maps:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2e9549 100%);
}

/* Waze - Bleu */
.direction-btn.waze {
    background: linear-gradient(135deg, #33ccff 0%, #0099ff 100%);
}

.direction-btn.waze:hover {
    background: linear-gradient(135deg, #29b5e6 0%, #0088e6 100%);
}

/* Apple Maps - Gris */
.direction-btn.apple-maps {
    background: linear-gradient(135deg, #86868b 0%, #636366 100%);
}

.direction-btn.apple-maps:hover {
    background: linear-gradient(135deg, #75757a 0%, #525254 100%);
}

/* Responsive mobile */
@media screen and (max-width: 768px) {
    .direction-btn {
        padding: 0.9rem;
    }
    
    .btn-icon {
        font-size: 1.3rem;
    }
    
    .btn-text {
        font-size: 0.9rem;
    }
}

/* ===== BOUTONS ITINÉRAIRE SIMPLIFIÉS ===== */

/* Bouton GPS principal */
.btn-gps-primary {
    transition: all 0.3s ease;
}

.btn-gps-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-gps-primary:active {
    transform: translateY(0);
}

.btn-gps-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Boutons applications */
.app-buttons-simple a {
    transition: all 0.3s ease;
}

.app-buttons-simple a:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateX(4px);
}

/* Responsive mobile */
@media screen and (max-width: 768px) {
    .btn-gps-primary {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .app-buttons-simple a {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}

/* ===== SYSTÈME D'AVIS PERSONNALISÉ ===== */

.ams-review-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.ams-review-form h3 {
    margin-bottom: 1.5rem;
    color: #2d3748;
}

/* Étoiles interactives */
.star-rating {
    display: flex;
    gap: 0.5rem;
    font-size: 2.5rem;
    cursor: pointer;
}

.star-rating .star {
    color: #e2e8f0;
    transition: color 0.2s;
}

.star-rating .star.active,
.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #ffd700;
}

.star-rating.active .star.active {
    color: #ffd700;
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Critères */
.criteria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.criteria-item label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #4a5568;
}

.criteria-item select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
}

/* Liste des avis */
.ams-reviews-list {
    margin-top: 2rem;
}

.ams-review-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.review-stars {
    color: #ffd700;
    font-size: 1.2rem;
}

.reviewer-name {
    font-weight: 700;
    color: #2d3748;
}

.review-date {
    color: #718096;
    font-size: 0.9rem;
}

.review-content {
    color: #4a5568;
    line-height: 1.6;
}

.review-criteria {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.review-criteria span {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .criteria-grid {
        grid-template-columns: 1fr;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}