html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #FAF7F2; 
    max-width: 1400px;
    margin: 0 auto;
}

body.menu-open {
    overflow: hidden;
}

/*HEADER*/
header {
    background: #C8A97E; 
    height: 70px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    justify-content: space-between; 
    align-items: center;
    position: relative;
    z-index: 1002; 
    margin-top: 15px;
}

#logo {
    font-size: 26px;
    font-weight: bold;
    color: #FAF7F2; 
    letter-spacing: 1px;
    text-decoration: none;
    flex-shrink: 1; 
    white-space: nowrap;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px; 
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010; 
    flex-shrink: 0; 
    margin-left: 20px; 
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #F5E9D3; 
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

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

nav ul li a {
    text-decoration: none;
    color: #FAF7F2; 
    font-size: 16px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: 0.3s;
}

nav ul li a:hover {
    background-color: #FAF7F2; 
    color: #7a664b;        
}

#nav-list li a.active {
    background-color: #FAF7F2; 
    color: #7a664b;          
    font-weight: bold;
}

@media (max-width: 576px) {
    body {
        padding: 15px; 
    }

    header {
        padding: 15px 20px; 
    }

    #logo {
        font-size: 20px; 
    }

    nav ul {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        
        background: #C8A97E; 
        backdrop-filter: blur(10px);
        
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease-in-out;
        z-index: 1000;
    }

    nav ul.active {
        opacity: 1;
        visibility: visible;
    }

    nav ul li {
        margin: 20px 0;
        transform: translateY(20px);
        transition: 0.4s;
    }

    nav ul.active li {
        transform: translateY(0);
    }

    nav ul li a {
        font-size: 24px;
        color: #FAF7F2;
        font-weight: bold;
    }

    #nav-list li a.active {
        background-color: #FAF7F2;
        color: #C8A97E;
    }
}

@media (min-width: 577px) {
    .hamburger {
        display: none !important; 
    }

    header {
        padding: 15px 20px;
    }

    nav ul {
        display: flex !important;
        position: static;
        flex-direction: row;
        background: transparent;
        opacity: 1;
        visibility: visible;
        height: auto;
        width: auto;
        backdrop-filter: none;
        
        gap: 10px; 
        flex-wrap: wrap; 
        justify-content: flex-end;
    }
    
    nav ul li {
        margin: 0; 
        transform: none;
    }

    nav ul li a {
        font-size: 14px; 
        padding: 6px 10px;
    }
} 

/*ACCUEIL*/
.hero-accueil {
    height: 100vh;
    width: 100%;
    background: url('images/hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    margin-top: 50px;
}

.hero-overlay-refined {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(25, 25, 15, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.hero-content {
    text-align: center;
    color: #FFFFFF; 
    padding: 20px;
    max-width: 900px; 
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #FFFFFF;
    font-weight: 400; 
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.citation-container {
    margin: 30px 0;
    position: relative;
    padding: 20px 0;
}

.citation-container::before, .citation-container::after {
    content: "“";
    font-size: 5rem;
    color: #C8A97E;
    position: absolute;
}
.citation-container::before {
    top: -20px;
    left: 50px;
}
.citation-container::after {
    content: "”";
    bottom: -40px;
    right: 50px;
}

.citation-hero {
    font-style: italic;
    font-size: 1.5rem;
    color: #FFFFFF;
    border-left: none;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    max-width: 700px;
    margin: 0 auto;
}

.btn-explorer-gold {
    display: inline-block;
    background: #C8A97E; 
    color: #F5E9D3; 
    padding: 18px 45px;
    border-radius: 50px; 
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-explorer-gold:hover {
    background: #F5E9D3; 
    color: #C8A97E; 
    transform: scale(1.03);
}

@media (max-width: 576px) {
    .hero-accueil {
        height: 70vh; 
    }
    .hero-content h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    .citation-hero {
        font-size: 1.1rem;
    }
    .citation-container::before, .citation-container::after {
        display: none;
    }
}

@media (min-width: 577px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
}

/*SECTION PERSONNALITÉS*/
.personnalites h2 {
    color: #C8A97E;
    margin-bottom: 30px;
    text-align: center;
    margin-top: 80px;
}

section.personnalites {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    display: flex;       
    align-items: center; 
    text-align: center;
    font-size: 2.2rem;
    font-weight: 600;
    margin: 80px 0 40px;
    position: relative;
    color: #C8A97E;
}

.section-title span {
    padding: 0 25px;     
    white-space: nowrap; 
}

.section-title::before,
.section-title::after {
    content: "";
    flex: 1;             
    height: 3px;
    background: #b8a48a; 
}

.perso-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.perso-card {
    background: #F5E9D3;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: 0.3s;
}

.perso-card:hover {
    transform: translateY(-4px);
}

.perso-card img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 12px;
    border: 3px solid #C8A97E;
}

.perso-card h3 {
    color: #C8A97E;
    margin-bottom: 6px;
}

.perso-card p {
    color: #8D6E63;
    margin-bottom: 20px;
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
        margin: 50px 0 30px;
    }

    .section-title span {
        padding: 0 10px;
    }

    .section-title::before,
    .section-title::after {
        height: 2px; 
    }

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

    .perso-card img {
        width: 100px;
        height: 100px;
    }

    .perso-card h3 {
        font-size: 1rem;
    }
}

.btn-perso-container {
    text-align: center;
    margin-top: 25px;
}

.btn-perso {
    display: inline-block;
    background: #C8A97E; 
    color: #F5E9D3; 
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    transition: 0.3s;
    font-weight: bold;
}

.btn-perso:hover {
    background: #8D6E63; 
    color: #F5E9D3;
}

/*LISTING*/
.table-container {
    width: 100%;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

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

.page-title {
    text-align: center;
    color: #C8A97E;
    margin-bottom: 40px;
}

.cafes-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 30px;
}

.cafe-card {
    background: #F5E9D3;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cafe-card:hover {
    transform: translateY(-5px);
}

.cafe-image {
    width: 100%;
    height: 200px;
    background: #C8A97E; 
}

.cafe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cafe-content {
    padding: 20px;
}

.cafe-content h3 {
    margin: 0 0 10px 0;
    color: #C8A97E;
    font-size: 22px;
    border-bottom: 2px solid #C8A97E;
    padding-bottom: 5px;
}

.cafe-meta {
    font-style: italic;
    color: #000;
    margin-bottom: 15px;
}

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

.cafe-details li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #000;
}
.cafe-coords {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(200, 169, 126, 0.4);
    font-size: 11px;
    color: #8D6E63 !important;
    list-style: none; 
    line-height: 1.5;
}

@media (min-width: 768px) {
    .cafes-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (min-width: 1024px) {
    .cafes-grid {
        grid-template-columns: repeat(3, 1fr); 
    }
}

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

.search-box {
    background: #F5E9D3; 
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.search-form {
    display: flex;
    flex-direction: column; 
    gap: 15px;
}

.input-group {
    position: relative;
    flex-grow: 1;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

#text {
    width: 100%;
    padding: 15px 15px 15px 45px; 
    border: 2px solid #C8A97E;
    border-radius: 8px;
    font-size: 16px;
    background: #FAF7F2;
    color: #C8A97E;
    outline: none;
    transition: 0.3s;
    box-sizing: border-box;
}

#text:focus {
    border-color: #C8A97E;
    box-shadow: 0 0 8px rgba(200, 169, 126, 0.2);
}

.btn-search {
    background: #C8A97E;
    color: #F5E9D3;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-search:hover {
    background: #8D6E63;
    color: #F5E9D3;
}

/*SECTION CARTE*/
.carte {
    margin-top: 50px;
    text-align: center;
}

.carte h2 {
    color: #C8A97E;
    margin-bottom: 10px;
}


#map {
    width: 100%;
    max-width: 900px;
    height: 400px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 3px solid #C8A97E; 
}

.leaflet-container {
    filter: saturate(90%) sepia(10%);
}

.popup-photo {
    width: 150px;       
    height: 100px;     
    object-fit: cover; 
    border-radius: 5px;
    margin-bottom: 8px;
    display: block;
}

.leaflet-popup-content {
    font-family: sans-serif;
    line-height: 1.4;
    text-align: center;
}

@media (min-width: 577px) {
    .search-form {
        flex-direction: row;
    }
    
    .btn-search {
        width: auto;
    }
}

/*PAGE DE REPONSE FORMULAIRE*/
.search-info-title {
    text-align: center;
    color: #C8A97E;
    font-size: 24px;
    margin-bottom: 40px;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 10px;
    font-weight: normal; 
}

.search-info-title span {
    font-weight: bold !important; 
    color: #8D6E63;              
}

.table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #C8A97E;
    color: #F5E9D3;
}

table th, table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.country-divider {
    background-color: #FAF7F2;
    font-weight: bold;
    color: #C8A97E;
}

.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px 20px; 
    color: #721c24;
    background-color: #f8d7da;
    border-radius: 15px;
    border: 1px solid #f5c6cb;
    margin-top: 20px;
}

.no-result h2 {
    margin-bottom: 10px;
}

.btn-container {
    text-align: center;
    margin: 40px auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.btn-container .btn {
    display: inline-block;
    background: #C8A97E;    
    color: #F5E9D3;        
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;  
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-container .btn:hover {
    background: #8D6E63;    
    color: #F5E9D3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.error-banner {
    background-color: #f8d7da; /* Fond rouge clair */
    color: #721c24;           /* Texte rouge foncé */
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 15px;
    animation: fadeIn 0.5s ease-in-out;
}

@media (max-width: 576px) {
    .btn-container {
        margin: 30px 0;
        padding: 0 15px;
    }

    .btn-container .btn {
        width: 100%;       
        padding: 12px 20px;
        font-size: 15px;
        box-sizing: border-box; 
    }
}

/* STYLE DES TABLES DE GESTION */

/* Conteneur principal pour centrer et espacer */
/* Le conteneur blanc qui doit rester centré */
.admin-table-container {
    max-width: 1200px;         /* Largeur max identique à ton header */
    margin: 40px auto;         /* Le "auto" à gauche et droite CENTRE le bloc */
    padding: 30px;
    background: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    box-sizing: border-box;    /* Pour que le padding ne fasse pas déborder */
    
    /* GESTION DU DÉBORDEMENT */
    overflow-x: auto;          /* Ajoute une barre de scroll SI la table est trop large */
}

.admin-table {
    width: 100%;               /* La table prend toute la largeur du bloc blanc */
    border-collapse: separate; 
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E0D7C6;
    table-layout: auto;        /* Permet aux colonnes de s'ajuster selon le contenu */
}

/* On réduit la taille de la police si c'est trop chargé */
.admin-table th, .admin-table td {
    padding: 12px 10px;
    font-size: 14px;           /* Un peu plus petit pour gagner de la place */
    word-break: break-word;    /* Coupe les mots trop longs (comme les adresses) */
}

/* Force les colonnes d'actions à être serrées pour laisser de la place au texte */
.admin-table th:nth-last-child(1), 
.admin-table th:nth-last-child(2),
.admin-table td:nth-last-child(1),
.admin-table td:nth-last-child(2) {
    width: 80px;
    text-align: center;
    white-space: nowrap;       /* Empêche les boutons de passer l'un sous l'autre */
}

/* --- BOUTONS D'ACTION (Ajouter, Modifier, Supprimer) --- */

/* Bouton Ajouter */
.btn-add {
    display: inline-block;
    background: #C8A97E;
    color: #FAF7F2;
    padding: 12px 25px;
    border-radius: 50px; /* Très arrondi style Pilule */
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(200, 169, 126, 0.3);
}

.btn-add:hover {
    background: #8D6E63;
    transform: translateY(-2px);
}

/* Boutons Modifier/Supprimer dans la table */
.btn-action {
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: 0.3s;
    display: inline-block;
    margin: 2px;
}

.btn-update {
    background-color: #F5E9D3;
    color: #C8A97E;
    border: 1px solid #C8A97E;
}

.btn-update:hover {
    background-color: #C8A97E;
    color: #FAF7F2;
}

.btn-delete {
    background-color: #f8d7da; /* Rouge clair pour suppression */
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-delete:hover {
    background-color: #721c24;
    color: #ffffff;
}

/* Responsive : Scroll horizontal sur petit écran */
@media (max-width: 992px) {
    .admin-table-container {
        overflow-x: auto;
    }
    .admin-table {
        min-width: 800px;
    }
}

/*FOOTER*/
footer {
    background: #C8A97E; 
    color: #F5E9D3; 
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-size: 15px;
    letter-spacing: 0.5px;
}

footer p {
    margin: 0;
}


