:root {
    --primary-color: #2c3e50; /* Bleu ardoise historique */
    --accent-color: #d4af37;  /* Doré patrimoine */
    --bg-page: #fcfcfc;      /* Blanc très légèrement grisé */
    --card-bg: #ffffff;
    --text-main: #1a1a1a;    /* Presque noir pour la lisibilité */
    --text-muted: #757575;   /* Gris doux pour les infos secondaires */
    --gold: #c5a059;
}

html, body, footer, header {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    color: #333;
}

.container, .odd-container {
    padding: 20px 0;
}

.card-main {
    --direction: row;
    --gradient-dir: to right;
    --bg: url('images/default.png');
    display: flex;
    flex-direction: var(--direction);
    align-items: center;
    background-image: linear-gradient(var(--gradient-dir), rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.1) 100%), var(--bg);
    background-size: cover;
    background-position: center;
    width: 90%;
    min-height: 300px;
    border-radius: 30px;
    margin: auto;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 20px 40px #00000026;
}

.odd-container .card-main {
    --direction: row-reverse;
    --gradient-dir: to left;
}

.content-overlay {
    padding: 60px;
    max-width: 600px;
    color: white
}

.card-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.card-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Backgrounds des cartes */
.bg-petra {
    --bg:url(images/petra.jpg);
}

.bg-unesco {
    --bg: url(images/unesco.png);
}

/* Boutons */
.buttons-group{
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.main-button {
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
}

.secondary-button {
    border: 1px solid white;
}

.main-button, .secondary-button {
    height: max-content;
    text-align: center;
    align-content: center;
    display: inline-block;
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.2s;
    box-sizing: border-box;
}

.main-button:hover { 
    transform: scale(1.05); 
}
.secondary-button:hover { 
    background: #ffffff33; 
    transform: scale(1.05); 
}

/* Section Info */
.info-section {
    text-align: center;
    padding: 80px 10%;
}

/* Navigation */
header nav {
    width: 100%;
    background-color: var(--accent-color);
    display: flex;
    justify-content: space-between; 
    align-items: center;
    position: relative;
    padding: 10px 0;
}

.logo {
    flex-shrink: 0;
    margin: 10px 20px;
}

.topnav {
    display: flex;
    gap: 20px;
    margin: 10px 20px;
}

.icon {
    display: none;
}


.search-section {
    background-color: #ffffff;
    padding: 60px 0;
    width: 85%;
    margin: -50px auto 40px; 
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px;
    padding: 0 40px;
}

.full-width { grid-column: span 2; }

.filter-group label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-group input[type="text"], .filter-group input[type="number"], .filter-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fcfcfc;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.filter-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.filter-group fieldset {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
}

.period-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}

.radio-group, .checkbox-group {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.form-actions {
    grid-column: span 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-submit:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

.btn-reset {
    background: none;
    border: none;
    color: #888;
    text-decoration: underline;
    cursor: pointer;
}










.listing-container {
    background-color: var(--bg-page);
    padding: 60px 5%;
}

.monuments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Cartes un peu plus larges */
    gap: 40px; /* Plus d'espace pour laisser respirer le design */
}

.monument-card {
    background: var(--card-bg);
    border-radius: 0px; /* On enlève l'arrondi pour un look plus "galerie d'art" */
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 1px solid #eeeeee; /* Ligne fine au lieu d'une grosse ombre */
}

.monument-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.card-image-wrapper {
    position: relative;
    height: 240px; /* Image plus haute pour mettre en valeur le monument */
    overflow: hidden;
}

.monument-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%); /* Effet légèrement désaturé pour le cachet historique */
    transition: transform 0.6s ease;
}

.monument-card:hover .monument-img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.unesco-badge {
    position: absolute;
    bottom: 0; /* Badge en bas de l'image cette fois */
    left: 0;
    background: var(--gold);
    color: white;
    padding: 8px 15px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.card-body {
    padding: 25px 5px; /* Pas de padding latéral pour aligner le texte sur les bords de la carte */
}

.monument-name {
    font-family: 'Playfair Display', serif; /* Si vous pouvez l'importer, sinon Serif par défaut */
    font-size: 1.6rem;
    margin: 0 0 8px 0;
    color: var(--text-main);
    font-weight: 500;
}

.monument-location {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 12px;
}

.monument-period {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}


@media only screen and (max-width: 576px){
    .card-main, .odd-container .card-main {
        flex-direction: column;
        --gradient-dir: to bottom;
    }

    .content-overlay {
        padding: 25px;
        margin: auto;
    }

    .buttons-group {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .main-button, .secondary-button {
        margin: 0;
        display: block;
        box-sizing: border-box;
        width: 75%;
    }

    /* Navigation mais sur petit écran */
    header nav {
        flex-direction: row; /* Garde le logo et l'icône sur la même ligne */
        flex-wrap: wrap;    /* Permet au menu de passer en dessous */
        max-width: 576px;
        box-sizing: border-box;
    }

    .topnav {
        display: none;      /* Cache le menu par défaut */
        width: 100%;        /* Prend toute la largeur pour passer dessous */
        flex-direction: column; 
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
    }

    .topnav.responsive {
        display: flex;
    }

    .topnav a {
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .icon {
        display: block;
        color: white;
        margin: 10px 15px;
    }

}