/*
Theme Name: Mon Thème Perso
Author: Ton Nom
Description: Thème pour AnnuaireMada - Restaurants d'Antananarivo
Version: 1.0
*/

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0 0 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    margin-bottom: 1rem;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ===== MENU NAVIGATION ===== */
nav {
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 1rem 1.5rem;
    display: block;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: #fff;
}

/* ===== CONTENU PRINCIPAL ===== */
main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

article {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

article h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 2rem;
}

article p {
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ===== FOOTER ===== */
footer {
    background: #2d3748;
    color: #a0aec0;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* ===== PAGE D'ACCUEIL (HERO) ===== */
.homepage .hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 5rem 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.homepage .hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    border: none;
    color: white;
}

.homepage .hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.annuaire-section {
    margin-top: 2rem;
}

/* ===== PAGE STATIQUE ===== */
.page-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.page-content h1 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.entry-content p {
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ===== PAGE RESTAURANT (SINGLE) ===== */
.restaurant-single-header {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.restaurant-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.restaurant-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.restaurant-info-overlay h1 {
    color: white;
    border: none;
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
}

.restaurant-rating-display {
    color: #ffd700;
    font-size: 1.5rem;
}

.restaurant-rating-display span {
    color: white;
    font-size: 1rem;
}

.restaurant-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.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 #667eea;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.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: #667eea;
    margin-bottom: 1rem;
}

.info-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.info-item strong {
    display: block;
    color: #2d3748;
    margin-bottom: 0.3rem;
}

.info-item a {
    color: #667eea;
    text-decoration: none;
}

#restaurant-map {
    height: 300px;
    border-radius: 8px;
}

/* ===== ANNUAIRE : FILTRES ET RECHERCHE ===== */
.annuairemada-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.annuairemada-filtres {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.annuairemada-filtres h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.filtres-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filtre-groupe {
    display: flex;
    flex-direction: column;
}

.filtre-groupe label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filtre-groupe input,
.filtre-groupe select {
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.filtre-groupe input:focus,
.filtre-groupe select:focus {
    outline: none;
    border-color: #667eea;
}

.bouton-groupe {
    flex-direction: row;
    gap: 0.5rem;
    align-items: flex-end;
}

.btn-rechercher,
.btn-reset {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-rechercher {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-rechercher:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-reset {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-reset:hover {
    background: #cbd5e0;
}

/* Grille de résultats */
.resultats-count {
    color: #4a5568;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.annuairemada-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.restaurant-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-image {
    display: block;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
}

.restaurant-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.card-content h3 a {
    color: #2d3748;
    text-decoration: none;
}

.card-content h3 a:hover {
    color: #667eea;
}

.card-rating {
    margin: 0.5rem 0;
}

.card-rating .stars {
    color: #ffd700;
    font-size: 1.1rem;
}

.card-rating .note {
    color: #4a5568;
    font-size: 0.9rem;
    margin-left: 0.3rem;
}

.card-quartier,
.card-cuisine {
    color: #4a5568;
    font-size: 0.95rem;
    margin: 0.3rem 0;
}

.btn-voir {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: color 0.3s;
}

.btn-voir:hover {
    color: #764ba2;
}

.aucun-resultat {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
}

.aucun-resultat p {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

/* ===== RESPONSIVE : TABLETTE (max 768px) ===== */
@media (max-width: 768px) {
    header h1 a {
        font-size: 1.8rem;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .homepage .hero {
        padding: 3rem 1.5rem;
    }
    
    .homepage .hero h1 {
        font-size: 2rem;
    }
    
    .restaurant-layout {
        grid-template-columns: 1fr;
    }
    
    .restaurant-single-header {
        height: 250px;
    }
    
    .restaurant-info-overlay h1 {
        font-size: 1.8rem;
    }
    
    .filtres-form {
        grid-template-columns: 1fr;
    }
    
    .bouton-groupe {
        flex-direction: column;
    }
    
    .btn-rechercher,
    .btn-reset {
        width: 100%;
        text-align: center;
    }
    
    .annuairemada-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 0 1rem;
    }
    
    .page-content,
    article {
        padding: 1.5rem;
    }
}

/* ===== RESPONSIVE : MOBILE (max 480px) ===== */
@media (max-width: 480px) {
    header h1 a {
        font-size: 1.5rem;
    }
    
    .homepage .hero h1 {
        font-size: 1.6rem;
    }
    
    .homepage .hero p {
        font-size: 1rem;
    }
    
    .annuairemada-filtres h2 {
        font-size: 1.3rem;
    }
    
    .restaurant-info-overlay {
        padding: 1rem;
    }
    
    .restaurant-info-overlay h1 {
        font-size: 1.4rem;
    }
    
    .card-content h3 {
        font-size: 1.1rem;
    }
}

/* ===== PAGE ARCHIVE ===== */
.archive-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.archive-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.archive-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    border: none;
    color: white;
}

.archive-description {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Filtres rapides */
.archive-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: #f0f0f0;
    color: #2d3748;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.results-count {
    text-align: center;
    color: #4a5568;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .archive-header h1 {
        font-size: 1.8rem;
    }
    
    .archive-filters {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
}

/* ===== PAGE 404 ===== */
.error-404-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.error-container {
    text-align: center;
}

.error-number {
    font-size: 8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.error-404-page h1 {
    color: #2d3748;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    border: none;
}

.error-message {
    color: #4a5568;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* Barre de recherche */
.error-search {
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

.error-search form {
    display: flex;
    gap: 0.5rem;
}

.error-search input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.error-search input:focus {
    outline: none;
    border-color: #667eea;
}

.error-search button {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.error-search button:hover {
    transform: translateY(-2px);
}

/* Boutons d'action */
.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Suggestions */
.error-suggestions {
    margin-top: 3rem;
}

.error-suggestions h2 {
    color: #2d3748;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .error-number {
        font-size: 5rem;
    }
    
    .error-404-page h1 {
        font-size: 1.8rem;
    }
    
    .error-message {
        font-size: 1rem;
    }
    
    .error-search form {
        flex-direction: column;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* ===== PAGE DE RECHERCHE ===== */
.search-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.search-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    border: none;
    color: white;
}

.search-count {
    font-size: 1.1rem;
    opacity: 0.95;
}

.search-again {
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.search-again form {
    display: flex;
    gap: 0.5rem;
}

.search-again input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.search-again input:focus {
    outline: none;
    border-color: #667eea;
}

.search-again button {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.aucun-resultat {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.aucun-resultat h2 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.aucun-resultat ul {
    text-align: left;
    max-width: 400px;
    margin: 1rem auto;
    color: #4a5568;
}

.aucun-resultat ul li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .search-header h1 {
        font-size: 1.6rem;
    }
    
    .search-again form {
        flex-direction: column;
    }
}

.breadcrumb {
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: #666;
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb a {
    color: #f093fb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #999;
}

.breadcrumb .current {
    color: #2d3748;
    font-weight: 600;
}