/* styles.css - Fichier CSS commun pour l'exposition "La santé s'affiche" */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Palette Pantone principale */
    --pantone-3125: #00AEC7; /* Cyan vif */
    --pantone-293: #003DA5;  /* Bleu royal */
    
    /* Variations et couleurs complémentaires */
    --cyan-light: #33BFD3;
    --cyan-lighter: #66CFDF;
    --blue-light: #3366B8;
    --blue-dark: #002D7A;
    
    /* Couleurs de base */
    --bg-light: #F5F5F5;
    --text-dark: #000000;
    --white: #FFFFFF;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animation nav */
#navbar {
    transition: transform .24s ease, box-shadow .24s ease;
    will-change: transform;
    height: 130px;
    width: 100%;
    background-image: url('../img/Symbols-MPM-grey.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#navbar.nav--hidden   { transform: translateY(-100%); }
#navbar.nav--scrolled { box-shadow: 0 6px 20px rgba(0,0,0,.06); }

@media (max-width: 1024px) {
    #navbar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    #navbar {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #navbar {
        width: 100%;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: transform 0.3s ease;
}

nav.hidden {
    transform: translateY(-100%);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 250px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: #0046ad;
    text-decoration: none;
    font-weight: 500;
    padding: 10px;
}

.nav-links a:hover {
    color: #00AEC7;
    
}

.nav-links li a.active {
    color: #00AEC7;
}

.language-switch {
    display: flex;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    padding: 0.5rem;
    border-radius: 25px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #0046ad;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.lang-btn.active {
    color: var(--pantone-293);
    border: 2px solid var(--pantone-293);
}

.lang-btn:hover {
    background: rgba(255,255,255,0.9);
    color: var(--pantone-293);
}

/* Menu burger pour mobile */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
}

/* Keep burger above the sliding panel so it's always clickable */
.burger {
    position: relative;
    z-index: 1400;
}

.burger span {
    width: 25px;
    height: 3px;
    background: var(--pantone-3125);
    transition: 0.3s;
}

/* Header */
header {
    margin-top: 130px;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--pantone-293) 0%, var(--pantone-3125) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/Symbols-MPM-grey.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 68%;
    opacity: 0.3;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}


header p {
    font-size: 1.3rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 1;
    font-style: italic;
    text-align: center;
    width: 1000px;
    margin: 0 auto;
    margin-top: 10px;
}


/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 2rem;
}

.part_title {
    text-align: center; 
    margin: 3rem 0 2rem; 
    font-size: 2rem; 
    color: var(--pantone-293);
}

/* Cards */
.card {
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--pantone-293);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.card h2 {
    color: var(--pantone-293);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.card h3 {
    color: var(--pantone-293);
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

.card p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.card ul {
    color: var(--text-light);
    line-height: 1.8;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.card ul li {
    margin-bottom: 0.5rem;
}

/* Thème spécifique pour les cartes thématiques */
.theme-card {
    color: var(--pantone-293);
    padding: 20px;
    border-radius: 20px;
    animation: fadeInUp 0.8s ease;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Changement de couleur du texte au survol */
.theme-card:hover h3,
.theme-card:hover p {
    color: white;
}

/* Animation au survol de la carte */
.theme-card:hover {
    transform: translateY(-10px);
    background: linear-gradient(135deg, var(--pantone-3125) 0%, var(--pantone-293) 100%);
    
}

.theme-icon {
    border-style: solid;
    border-color: white;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Navigation theme container et grid */
.theme-navigation-container {
    padding: 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top: #003DA5 8px solid;
}

.theme-navigation-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin: 1rem 0;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted white;
    cursor: pointer;
}

.tooltiptext {
    visibility: hidden;
    width:16rem;
    bottom: 100%;
    left: 50%;
    right: 50%;
    margin-left: -65px;
    background-color: white;
    color: #000000;
    text-align: center;
    border: #000000 1px solid;
    border-radius: 6px;
    padding: 0.1rem;
    position: absolute;
    z-index: 1;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}

/* Theme card modifications for tooltips */
.theme-card {
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

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

@media (max-width: 480px) {
    .theme-navigation-grid {
        grid-template-columns: 1fr;
    }
}

/* Info Box */
.info-box {
    background: var(--pantone-293);
    padding: 2rem;
    border-radius: 20px;
    color: var(--white);
    margin: 3rem 0;
    animation: slideInRight 1s ease;
}

.info-box h3 {
    margin-bottom: 1rem;
    color: var(--white);
}

.info-box p {
    line-height: 1.8;
    color: var(--white);
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--pantone-293);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--pantone-3125);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 130px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem;
        transition: left 0.3s ease;
        height: calc(100vh - 80px);
    }
    
    /* Change .active to .menu-open */
    .nav-links.menu-open {
        left: 0;
    }
    
    .burger {
        display: flex;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
        width: 100%;
    }
    
    .timeline-events {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .event-card.left {
        text-align: left;
        border-right: none;
        border-left: 4px solid var(--pantone-3125);
    }
    
    .decade-circle {
        width: 150px;
        height: 150px;
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    header::before {
        background-position: center 55%;
    }
    
}

/* Hide/Show language elements */
.fr-text, .en-text {
    transition: opacity 0.3s ease;
}

/*Grid de 4 cards*/
.cards-grid{
    display: grid;
    gap: 18px;                 /* écart horizontal/vertical entre cartes */
    align-items: stretch;
}

/* 4 colonnes = toutes les cartes sur UNE ligne */
.cards-grid.four{
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 2 colonnes = affichage deux par deux */
.cards-grid.two{
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* rendre chaque .card à hauteur égale et propre en grid */
.cards-grid .card{
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* responsive : 4→2 sous 1024px, puis 1 sous 640px */
@media (max-width: 1024px){
    .cards-grid.four{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
    .cards-grid,
    .cards-grid.four,
    .cards-grid.two{ grid-template-columns: 1fr; }
}

/* Footer */
footer {
    color: var(--white);
    text-align: center;
    padding: 2rem;
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    background: #003DA5 url('../img/Symbols-MPM-blue.png');
    background-repeat: no-repeat;
    background-size:cover;
    background-position: center 50%;
}

/* Dropdown menu styles */
.nav-item {
    position: relative;
}

.dropdown-toggle {
    background: transparent;
    border: none;
    color: #0046ad;
    cursor: pointer;
    font-weight: 500;
    padding: 10px;
}

.dropdown {
    position: absolute;
    left: 0;
    top: 100%; /* place directly below parent to avoid hover gap */
    background: white;
    border-radius: 8px;
    min-width: 220px;
    list-style: none;
    padding: 0.5rem 0;
    display: none;
    z-index: 1200;
}

.dropdown li a {
    display: block;
    padding: 0.6rem 1rem;
    color: #0046ad;
    font-size: 1rem; /* same typography as menu */
}

.dropdown li a:hover {
    background: linear-gradient(90deg, rgba(0,174,199,0.06), rgba(0,174,199,0.02));
}

/* Show dropdown on hover/focus for desktop */
@media (min-width: 769px) {
    /* Show on hover/focus; dropdown is directly adjacent to button (no gap)
    which prevents accidental closing when moving the mouse down */
    .nav-item:hover > .dropdown,
    .nav-item:focus-within > .dropdown {
        display: block;
    }
}

/* Mobile: list view showing menus and submenus together */
@media (max-width: 768px) {
    .dropdown {
        position: relative;
        top: 0;
        left: 0;
        background: transparent;
        padding: 0.25rem 0 0.5rem 0;
        min-width: 0;
        overflow: visible;
        max-height: none;
        display: block;
    }
    
    /* Top-level toggles become full-width list items */
    .dropdown-toggle {
        display: block;
        width: 100%;
        text-align: left;
        padding: 12px 0;
        background: transparent;
        border: none;
    }
    
    /* Submenu links are indented under their parent */
    .dropdown li a {
        padding-left: 1.8rem;
        background: transparent;
        border-radius: 4px;
        margin: 0.12rem 0;
        display: block;
        color: #0046ad;
    }
    
    .nav-links .nav-item {
        width: 100%;
    }
    
    .nav-links a, .dropdown-toggle {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }
}

/* Make the open mobile panel scrollable and ensure smooth touch scrolling */
.nav-links.menu-open {
    left: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ensure the opened panel doesn't cover the burger (which must stay interactive) */
.nav-links.menu-open {
    z-index: 1200;
}

/* Make dropdown toggle look like menu links and add a caret */
.dropdown-toggle {
    font-size: 1.05rem; /* match menu link size */
    color: #0046ad;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle::after {
    font-size: 0.9rem;
    margin-left: 6px;
    transition: transform 0.22s ease;
    display: inline-block;
}

.has-dropdown.open > .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Ensure menu and submenu typography looks consistent */
.nav-links a, .dropdown-toggle, .dropdown li a {
    font-family: inherit;
    font-weight: 500;
}

.bulletin {
    text-decoration: none;
    color: black;
}

.bulletin:hover {
    color: #00AEC7;
}

iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.card-img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    margin-top: 20px;
}

/*grid for iframe pdf*/

.pdf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.pdf-grid iframe {
    height: 35.6rem!important;
    border-radius: 8px;
    padding: 1rem;
    .pdf-grid {
        grid-template-columns: 1fr;
    }
}

.poster{
    width: 30rem; 
    height: 45rem; 
    margin: 0 auto
}

@media (max-width: 600px) { 
    .poster { 
        width: 100%; 
        height: 35.5rem;}
    .pdf-grid {
        grid-template-columns: 1fr;
    }
}

/* Wrapper pour les liens vidéo */
.video-link-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.video-link-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-youtube {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1.2rem 2rem;
    background: #FF0000;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    border-radius: 0;
    transition: background 0.3s ease;
}

.btn-youtube i {
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .video-link-wrapper {
        max-width: 95%;
        margin: 1.5rem auto;
    }
    
    .btn-youtube {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .video-link-wrapper {
        max-width: 100%;
        padding: 0;
    }
    
    .btn-youtube {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* Images info-box */
.image_info {
    color: var(--white);
}

.image_info img {
    width: 45rem;
    height: auto;
    border-radius: 15px;
    margin-right: 1rem;
}

@media screen and (max-width: 900px) {
    .image_info img {
        width: 25rem;
        margin: 0 auto 1rem auto;
        display: block;
    }
    
}