/* ==========================================================================
   Génération Y : styles communs à toutes les pages
   ========================================================================== */

@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/montserrat.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/fonts/cormorant-garamond.woff2') format('woff2');
    font-weight: 500 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --noir: #0b0a09;
    --noir-carte: #151311;
    --or: #c9975b;
    --or-clair: #e2b67f;
    --texte: #f3ede6;
    --texte-doux: #b8aea3;
    --bordure: rgba(201, 151, 91, 0.45);
    --erreur: #e07a6a;
    --succes: #8fbf8a;
    --police-texte: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --police-chiffres: 'Cormorant Garamond', Georgia, serif;
    --rayon: 6px;
}

/* Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    margin: 0;
    background-color: var(--noir);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.principal {
    flex: 1 0 auto;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--or);
    text-decoration: none;
}

h1,
h2,
h3 {
    margin: 0 0 0.6em;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1 {
    font-size: 1.9rem;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.05rem;
}

p {
    margin: 0 0 1em;
}

.conteneur {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding-top: 48px;
    padding-bottom: 48px;
}

.sur-titre {
    margin-bottom: 0.8em;
    color: var(--or);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.texte-or {
    color: var(--or);
}

.visuellement-cache {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.icone {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icone-grande {
    width: 40px;
    height: 40px;
    color: var(--or);
    stroke-width: 1.1;
}

.entete-page {
    max-width: 760px;
    margin-bottom: 32px;
}

.entete-page p:last-child {
    color: var(--texte-doux);
}

.aucun-resultat {
    padding: 24px;
    border: 1px dashed var(--bordure);
    border-radius: var(--rayon);
    color: var(--texte-doux);
    text-align: center;
}

.complet {
    color: var(--erreur);
}

/* Titre de section avec filet */
.titre-ligne {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    margin-bottom: 24px;
}

.titre-ligne h2 {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 16px;
    margin: 0;
    color: var(--or);
    font-size: 1rem;
    letter-spacing: 0.2em;
}

.titre-ligne h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--bordure);
}

.titre-ligne-lien {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.titre-ligne-lien::after {
    content: ' \2192';
}

/* Cartes événements (accueil et liste)
   ========================================================================== */

.grille-evenements {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.carte-evenement {
    flex: 0 0 100%;
    overflow: hidden;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    background-color: var(--noir-carte);
    transition: border-color 0.2s;
}

.carte-evenement-lien {
    display: block;
    height: 100%;
    color: var(--texte);
}

.carte-evenement-visuel {
    position: relative;
    height: 0;
    padding-top: 62%;
    background: linear-gradient(135deg, #2a2118 0%, var(--noir-carte) 60%);
}

.carte-evenement-visuel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Logo affiché en entier quand l'événement n'a pas de photo */
.carte-evenement-visuel img.image-defaut {
    padding: 24px;
    object-fit: contain;
}

.pastille-date {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 58px;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid var(--or);
    border-radius: var(--rayon);
    background-color: rgba(11, 10, 9, 0.85);
    line-height: 1.1;
    text-transform: uppercase;
}

.pastille-date-jour,
.pastille-date-mois {
    color: var(--or);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.pastille-date-numero {
    font-family: var(--police-chiffres);
    font-variant-numeric: lining-nums;
    font-size: 1.8rem;
    font-weight: 600;
}

.carte-evenement-corps {
    padding: 16px 18px 18px;
}

.carte-evenement-titre {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.carte-evenement-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    color: var(--texte-doux);
    font-size: 0.82rem;
}

.carte-evenement-info .icone {
    color: var(--or);
}

@media (hover: hover) {
    .carte-evenement:hover {
        border-color: var(--or);
    }
}

@media (min-width: 600px) {
    .carte-evenement {
        flex-basis: calc(50% - 10px);
    }
}

@media (min-width: 960px) {
    .carte-evenement {
        flex-basis: calc(25% - 15px);
    }
}

/* Boutons
   ========================================================================== */

.boutons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.bouton {
    display: inline-block;
    padding: 14px 26px;
    border: 1px solid var(--or);
    border-radius: var(--rayon);
    background-color: var(--or);
    color: var(--noir);
    font-family: var(--police-texte);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.2s, color 0.2s;
}

.bouton-contour {
    background-color: transparent;
    color: var(--or);
}

.bouton-petit {
    padding: 10px 16px;
    font-size: 0.72rem;
}

@media (hover: hover) {
    .bouton:hover {
        background-color: var(--or-clair);
        border-color: var(--or-clair);
    }

    .bouton-contour:hover {
        background-color: var(--or);
        color: var(--noir);
    }
}

/* Formulaires
   ========================================================================== */

.champ {
    margin-bottom: 18px;
}

.champs-ligne {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
}

.champs-ligne .champ {
    flex: 1 1 240px;
}

.champ-case {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.champ-case input {
    margin: 3px 0 0;
}

.champ-case label {
    margin: 0;
    font-size: 0.85rem;
}

/* Formulaire court centré (connexion, mot de passe) */
.carte-formulaire {
    max-width: 460px;
    margin: 0 auto;
    padding: 28px 20px;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    background-color: var(--noir-carte);
}

.carte-formulaire .message {
    margin: 0 0 20px;
}

.carte-formulaire-note {
    margin: 16px 0 0;
    color: var(--texte-doux);
    font-size: 0.85rem;
}

.bouton-large {
    width: 100%;
}

.liste-erreurs {
    margin: 0;
    padding-left: 18px;
}

.champ label {
    display: block;
    margin-bottom: 6px;
    color: var(--texte-doux);
    font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="search"],
select,
textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    background-color: var(--noir-carte);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: 16px; /* 16px minimum : évite le zoom automatique d'iOS */
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c9975b' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

/* iOS centre la date par défaut */
input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--or);
    outline: none;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--or);
}

/* Messages
   ========================================================================== */

.message {
    margin: 24px 0 0;
    padding: 14px 18px;
    border: 1px solid;
    border-radius: var(--rayon);
    background-color: var(--noir-carte);
}

.message-succes {
    border-color: var(--succes);
    color: var(--succes);
}

.message-erreur {
    border-color: var(--erreur);
    color: var(--erreur);
}

/* En-tête et menu
   ========================================================================== */

.entete {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(201, 151, 91, 0.2);
    background-color: var(--noir);
}

.entete-contenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
}

.entete-logo img {
    width: 64px;
    height: auto;
}

.menu-bouton {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    background-color: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.menu-bouton-barre {
    display: block;
    height: 2px;
    margin: 3px 0;
    background-color: var(--or);
}

.menu {
    display: none;
    width: 100%;
    padding-top: 16px;
}

.menu-ouvert .menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.menu-liste {
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.menu-lien {
    display: block;
    padding: 12px 0;
    color: var(--texte);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.menu-deconnexion {
    margin: 8px 0 0;
}

.menu-deconnexion .menu-lien {
    padding: 8px 0;
    border: 0;
    background-color: transparent;
    color: var(--texte-doux);
    font-family: var(--police-texte);
    font-size: 0.75rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.menu-lien[aria-current="page"] {
    color: var(--or);
}

@media (hover: hover) {
    .menu-lien:hover {
        color: var(--or);
    }
}

/* Pied de page
   ========================================================================== */

.pied {
    margin-top: 48px;
    border-top: 1px solid rgba(201, 151, 91, 0.2);
    color: var(--texte-doux);
    font-size: 0.85rem;
}

.pied a {
    color: var(--texte-doux);
}

@media (hover: hover) {
    .pied a:hover {
        color: var(--or);
    }
}

.pied-contenu {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 32px;
}

.pied-marque img {
    width: 72px;
    height: auto;
    margin-bottom: 16px;
}

.pied-titre {
    margin-bottom: 12px;
    color: var(--or);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.pied-liste,
.pied-legal {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pied-liste li {
    margin-bottom: 6px;
}

.pied-bas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    padding-bottom: 24px;
    border-top: 1px solid rgba(201, 151, 91, 0.15);
    font-size: 0.78rem;
}

.pied-bas p {
    margin: 0;
}

.pied-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

/* Tablette et plus
   ========================================================================== */

@media (min-width: 768px) {
    h1 {
        font-size: 2.6rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    .conteneur {
        padding-right: 24px;
        padding-left: 24px;
    }

    .section {
        padding-top: 72px;
        padding-bottom: 72px;
    }

    .pied-contenu {
        flex-direction: row;
        justify-content: space-between;
    }

    .pied-marque {
        max-width: 320px;
    }

    .pied-bas {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Ordinateur : menu horizontal
   ========================================================================== */

@media (min-width: 960px) {
    .entete-contenu {
        flex-wrap: nowrap;
    }

    .entete-logo img {
        width: 80px;
    }

    .menu-bouton {
        display: none;
    }

    .menu,
    .menu-ouvert .menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: auto;
        padding-top: 0;
    }

    .menu-liste {
        display: flex;
        width: auto;
        margin: 0 32px 0 0;
    }

    .menu-lien {
        padding: 8px 18px;
    }

    .menu-deconnexion {
        margin: 0 0 0 14px;
    }
}

/* Champ piège anti-robots, invisible pour les visiteurs (contact, mot de passe oublié) */
.champ-piege {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Rappel en rouge, à côté d'une confirmation (courriers indésirables) */
.message-alerte {
    border-color: var(--erreur);
    color: var(--erreur);
}
