/* ============================================================
   BASE.CSS — Styles globaux CAPVO
   - Reset / body / typographie
   - Bandeau, menu hamburger, auth-bar
   - Lightbox global, boutons, retour haut
   - Responsive global
   - Session warning
============================================================ */

/* ============================================================
   BODY / TYPOGRAPHIE
============================================================ */
body {
    background-color: #b9ffc1;
    /* background-image: url("images/fond.png"); */
    font-family: verdana, Arial, Helvetica, sans-serif;
    color: #000;
}

p {
    text-align: justify;
    font-size: 0.9em;
}

h1 {
    letter-spacing: 4px;
    font-family: 'delius';
    font-size: 1.5em;
    color: #2c2a71;
    margin-top: 5px;
}

h2 {
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1em;
    text-align: center;
    color: #565656;
}

h3 {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1em;
    text-align: center;
    color: #005a08;
}

h4 {
    font-size: 0.9em;
    text-align: center;
}

h5 {
    text-transform: uppercase;
    font-size: 1.2em;
    font-weight: 400;
    text-align: center;
    color: #2c2a71;
    margin: 0;
}

h6 {
    font-size: 1.2em;
    font-weight: 400;
    text-align: left;
    margin: 0;
}

li {
    text-align: left;
}

a {
    text-decoration: none;
    color: #000;
}

a:hover {
    color: #535353;
}

img {
    border: none;
    display: block;
    margin: auto;
}

/* ============================================================
   BANDEAU
============================================================ */
#bandeau {
    margin: auto;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.9em;
    padding-bottom: 1px;
    background-color: #fff;
}

.bandeau {
    margin-top: 10px;
}

#bandeau img {
    box-shadow: none;
}

#conteneur {
    max-width: 100%;
    padding-bottom: 30px;
    margin: 0 10px 0 10px;
}

.rubriques {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 20px;
}

/* ============================================================
   CONTENEURS GENERIQUES
============================================================ */
.sans {
    box-shadow: none;
}

.contenu {
    max-width: 1030px;
    padding: 0 5px 10px 5px;
    text-align: center;
    margin: auto;
}

.note {
    font-style: italic;
    text-align: center;
    margin-top: -15px;
}

.legend {
    margin: 12px 0 25px 0;
    text-align: center;
    font-style: italic;
}

.centre {
    text-align: center;
}

.gauche {
    text-align: left;
}

#contacts {
    margin-bottom: 40px;
}
.lien {
    margin: auto;
    text-align: center;
    color: #000;
    font-size: 0.9em;
}

.lien:hover {
    color: #535353;
}

.projet {
    text-align: center;
    color: red;
    font-style: italic;
}
.aide {
    text-align: center;
    color: red;
    background: #dbe0ef;
    border: 2px solid #aeb8de;
    padding: 1em 1em 1em 1em;
}

.index {
    box-shadow: none;
    max-width: 300px;
    max-height: 300px;
}
.main {
    font-size: 2.2em;
}

#reunions {
    margin-top: 20px;
}

.accueil {
    margin-top: 50px;
    display: table-cell;
    vertical-align: middle;
}

.court {
    width: 200px;
}
/* ============================================================
   LIGHTBOX GLOBAL (modal classique)
============================================================ */
main {
    width: 100%;
    margin: auto;
}

.galerie {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4px;
}

.galerie img {
    width: 400px;
    box-shadow: none;
}
.close {
    color: white;
    font-size: 2em;
    position: fixed;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

/* ============================================================
   BOUTON DE FERMETURE DE PAGE
============================================================ */
button {
    display: inline-block;
    position: fixed;
    right: 0px;
    background: rgba(0, 0, 0, 0);
    border: none;
    color: #fff;
    text-align: center;
    font: bold;
    font-size: 25px;
    width: 80px;
    cursor: pointer;
    margin: 15px 5px 5px 5px;
}

button.noir {
    display: inline-block;
    position: fixed;
    right: 0px;
    background: rgba(0, 0, 0, 0);
    border: none;
    color: #000;
    text-align: center;
    font-size: 25px;
    width: 80px;
    cursor: pointer;
    margin: 15px 5px 5px 5px;
}

/* ============================================================
   HAMBURGER MENU
============================================================ */
#menu__toggle {
    opacity: 0;
}

#menu__toggle:checked + .menu__btn > span {
    transform: rotate(45deg);
}

#menu__toggle:checked + .menu__btn > span::before {
    top: 0;
    transform: rotate(0deg);
}

#menu__toggle:checked + .menu__btn > span::after {
    top: 0;
    transform: rotate(90deg);
}

#menu__toggle:checked ~ .menu__box {
    left: 0 !important;
}

.menu__btn {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10001 !important;
}

.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
    display: block;
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: #333 !important;
    transition-duration: .25s;
}

.menu__btn > span::before {
    content: '';
    top: -8px;
}

.menu__btn > span::after {
    content: '';
    top: 8px;
}

.menu__box {
    display: block;
    position: fixed !important;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100%;
    margin: 0;
    padding: 80px 0;
    list-style: none;
    background-color: #ECEFF1;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, .4);
    transition-duration: .25s;
    z-index: 10000 !important;
}

.menu__item {
    display: block;
    padding: 12px 24px;
    color: #000;
    font-size: 1.2em;
    text-decoration: none;
    transition-duration: .25s;
}

.menu__item:hover {
    font-weight: bold;
    color: #000;
}

/* ============================================================
   BARRE DE CONNEXION (auth-bar)
============================================================ */
.auth-bar-capvo {
    background: #ffffff;
    border: 1px solid #cccccc;
    padding: 8px 12px;
    margin: 10px auto 20px auto;
    max-width: 900px;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-bar-capvo .auth-info {
    font-size: 0.95em;
    color: #333333;
}

.auth-bar-capvo .auth-actions a {
    display: inline-block;
    padding: 6px 12px;
    background: #2e7d32;
    color: white;
    text-decoration: none;
    margin-left: 8px;
    font-size: 0.9em;
}

.auth-bar-capvo .auth-actions a:hover {
    background: #1b5e20;
}
/* ============================================================
   FOOTER PUBLIC
============================================================ */
.footer-capvo {
    text-align: center;
    margin-top: 40px;
    padding: 20px 10px;
    font-size: 0.85em;
    color: #555;
}

/* ============================================================
   SESSION WARNING (extrait de header_public.php)
============================================================ */
#session-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    display: none;
}

#session-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 25px 35px;
    border-radius: 14px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    text-align: center;
    display: none;
}

#session-warning .countdown {
    font-size: 1.5em;
    font-weight: bold;
    color: #c0392b;
}

/* ============================================================
   RESPONSIVE GLOBAL (smartphones)
============================================================ */
@media (max-width: 1000px) {
    * {
        box-sizing: border-box;
    }

    body {
        width: auto;
        margin: 0;
        padding: 0;
    }

    img,
    table,
    td,
    blockquote,
    code,
    pre,
    textarea,
    input,
    iframe,
    object,
    embed,
    video {
        max-width: 100%;
    }

    img {
        height: auto;
    }

    textarea,
    table,
    td,
    th,
    code,
    pre,
    samp {
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        hyphens: auto;
        word-wrap: break-word;
    }

    code,
    pre,
    samp {
        white-space: pre-wrap;
    }}

/* Réduction harmonieuse des polices en orientation paysage */
@media (max-device-width: 768px) and (orientation: landscape) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
}

/* Mobile : ajustement auth-bar */
@media (max-width: 600px) {
    .auth-bar-capvo {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        font-size: 1em;
    }

    .auth-bar-capvo .auth-actions a {
        padding: 10px 14px;
        font-size: 1em;
        margin-left: 0;
        margin-bottom: 8px;
    }
}

/* ----------------------------------------------------------
   MESSAGES D'ERREUR (utilisés dans les pages publiques + admin)
----------------------------------------------------------- */
.erreur,
p.erreur {
    color: #c00;
    font-weight: bold;
    background: #fff5f5;
    padding: 6px 10px;
    border-left: 3px solid #c00;
    border-radius: 2px;
}

/* ============================================================
   ACCESSIBILITÉ MOBILE — taille de tap target ≥ 44 px
   Norme WCAG 2.1 (AAA) — confort tactile sur smartphone.
   Ne s'applique qu'aux écrans étroits ; le desktop reste compact.
============================================================ */
@media (max-width: 600px) {
    .concours-btn,
    .auth-btn-capvo,
    .filtre-btn,
    .photo-download,
    .photo-suppr-admin,
    .menu__item,
    button[type="submit"],
    button[type="button"] {
        min-height: 44px;
        line-height: 1.4;
    }
}

/* ============================================================
   ACCESSIBILITÉ — réduction des animations
   Respecte le réglage système "Réduire les animations" (iOS/Android/
   macOS/Windows) pour les utilisateurs sensibles au mouvement.
============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
