/* ==========================================================================
   GLOBAL CONFIGURATION & TYPOGRAPHY
   ========================================================================== */
/* Défilement doux lors du clic sur l'ancre */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-paragraph);
    color: var(--text-main);
    line-height: 1.8;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-natural));
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-primary);
    font-weight: normal;
}

h1 {
    font-size: 1.6rem;
}

h2 {
    font-size: 1.4rem;
    border-top: 2px dotted #babea8;
}

h3 {
    font-size: 1.2rem;
    font-weight: 500;
}

h4 {
    font-size: 1rem;
    text-align: right;
}

h1::first-letter,
h2::first-letter,
h3::first-letter,
h4::first-letter {
    font-family: var(--font-title);
    font-size: 140%;
    line-height: 1;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--standard-transition);
}

a:hover {
    color: var(--color-light);
}

main a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

ul,
p {
    font-family: var(--font-paragraph);
    font-size: 1rem;
    font-style: italic;
    line-height: 2.2;
    text-align: justify;
    margin: 0 auto;
}

p {
    padding-top: 1rem;
}

/* Lettrine monumentale sur chaque paragraphe */
p::first-letter {
    font-family: var(--font-paragraph);
    font-size: 2rem;
    line-height: 1;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.banner-conditional {
    background-color: var(--color-primary);
    color: var(--color-light);
    text-align: center;
    padding: 0.75rem;
    font-size: 0.9rem;
}

.banner-conditional:not([hidden]) {
    display: block;
}

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--color-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout-wrapper {
    display: flex;
    flex: 1;
    position: relative;
}

.sidebar-nav {
    width: 280px;
    background-color: var(--color-secondary);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2rem;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-brand .site-logo {
    max-width: 100%;
    height: auto;
}

.contact-bar {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.contact-bar a {
    color: var(--text-main);
    padding: 0.4rem;
    border-radius: 4px;
    transition: background var(--standard-transition);
}

.contact-bar a:hover {
    background: var(--color-hover);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
}

.nav-links a {
    font-family: 'Cinzel', serif;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color var(--standard-transition);
    width: 100%;
    text-align: center;
}

.nav-links a:hover {
    background-color: var(--color-hover);
    /*text-decoration: underline;*/
}

.nav-heraldry .site-heraldry {
    max-width: 80px;
    margin: 0 auto;
    display: block;
}

.nav-heraldry img {
    width: 100%;
}

.content-area {
    flex: 1;
    padding: 3rem;
}

.site-footer {
    background-color: var(--color-natural);
    color: var(--color-light);
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--color-light);
}

.menu-toggle-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--button-background);
    color: var(--text-main);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle-btn:hover {
    background: var(--color-accent);
}

/* Boutons Retour en haut (Bas-droite et Haut-droite) */
.back-to-top,
.back-to-top-topright {
    position: fixed;
    background: var(--button-background);
    color: var(--text-main);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 900;
}

.back-to-top:hover,
.back-to-top-topright:hover {
    background: var(--color-accent);
}

.back-to-top:not([hidden]),
.back-to-top-topright:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top {
    bottom: 2rem;
    right: 2rem;
}

/* suspended nomore distinct behavior */
.back-to-top-topright {
    top: 1rem;
    right: 1rem;
}


/* Eléments actifs uniquement sur un terminal ordinateur */
/* suspended nomore distinct behavior
@media (pointer: fine) {
    .back-to-top-topright {
        top: 1rem;
        right: 1rem;
    }
}
*/

/* ==========================================================================
   Specific widgets
   ========================================================================== */
.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    /* Supprime la bordure par défaut des iframes */
}

/* Grille de présentation */
#overview .content-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.card {
    background-color: var(--color-ligth);
    border: 1px solid var(--color-base);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform var(--standard-transition);
}

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

.card h1 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 0.5rem;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--color-neutral-dark);
    margin-bottom: 0.5rem;
}

/*
    Spécifique sur chaque page nommée
    */
#histoire .card img {
    height: unset;
}

#location main h1 {
    font-size: 1.25rem;
}

#providers main h2 {
    margin-top: 3rem;
}

#providers main h3 {
    margin-top: 1.5rem;
}


/*  page contact et accès pour l'affichage densifié
    */
div.fcc {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

div.location {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* Grille de présentation page de contact pour le plan */
.map-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.map-expand-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    transition: background var(--standard-transition);

    background: var(--button-background);
    color: var(--text-main);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    align-items: center;
    gap: 0.5rem;

    border-radius: 4px;
    text-decoration: none !important;
    font-size: 0.85rem;
    /*border: 1px solid var(--color-accent);*/
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.map-expand-button:hover {
    background-color: var(--color-accent);
    color: var(--text-main) !important;
}



/*
    Toutes les cartes de contacts services extérieurs, contact et accès
    */
.contact-card {
    font-family: Arial, sans-serif;
    border: 1px solid #ddd;
    padding: 20px;
    width: 100%;
    /* Par défaut en largeur fluide */
    max-width: 400px;
    /* Limite la largeur sur grand écran */
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contact-list {
    list-style: none;
    padding: 0;
}

/*
.contact-list li { margin-bottom: 15px; }
*/
.contact-list a {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 16px;
    /* Taille confortable pour le toucher */
    padding: 5px 0;
    white-space: nowrap;
    overflow-x: hidden;
}

.contact-list a:hover {
    color: #007bff;
    padding-left: 10px;
    text-decoration: none;
    /* Effet de glissement plus fluide */
}

/* SÉLECTEURS D'ATTRIBUTS AUTOMATIQUES */
.contact-list a[href^="tel:"]::before {
    content: "📞";
}

.contact-list a[href^="mailto:"]::before {
    content: "✉️";
}

.contact-list a[href^="http"]::before {
    content: "🌐";
}

/* Cas particulier pour l'adresse (si elle commence par http/https) */
/* On peut aussi cibler un mot-clé dans l'URL si besoin */
.contact-list a[href*="maps"]::before {
    content: "📍";
}

.contact-list a::before {
    margin-right: 12px;
    font-size: 1.2em;
    width: 30px;
}


/*
    Le menu de chipset
    */
/* Disposition horizontale du menu */
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    justify-content: center;
}

/* Style type "Material Pill / Chip" */
.nav-menu a {
    text-decoration: none;
    color: #49454f;
    background-color: #daddd1;
    padding: 8px 16px;
    border-radius: 20px;
    /* Bords arrondis */
    font-family: system-ui, sans-serif;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    text-decoration: none !important;
}

/* Effet au survol et au clic */
.nav-menu a:hover {
    background-color: var(--color-accent);
    color: var(--text-main) !important;
}

/* ==========================================================================
   RÈGLE DE REPLI (< 666px ou tactile)
   ========================================================================== */

@media (max-width: 666px) {

    /*  page contact et accès pour l'affichage densifié
    */
    div.fcc {
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
    }
}

/* ==========================================================================
   RÈGLE DE REPLI (< 950px ou tactile) : MENU COULISSANT EN SUPERPOSITION
   ========================================================================== */
@media (max-width: 950px),
(pointer: coarse) {
    .menu-toggle-btn {
        display: flex;
    }

    /* we keep it
    .back-to-top-topright {
        display: none !important;
    }
    */
    .layout-wrapper {
        flex-direction: column;
    }

    .sidebar-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform var(--standard-transition);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        justify-content: flex-start;
        padding-top: 3.5rem;
    }

    .sidebar-nav.is-open {
        transform: translateX(0);
    }

    /*.nav-heraldry,*/
    .nav-brand {
        display: none;
    }

    .content-area {
        padding: 1.5rem;
        padding-top: 3rem;
        width: 100%;
    }

    .site-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}
