:root {
    --fond: #1b1f24;
    --fond-carte: #242a32;
    --fond-carte-hover: #2a3039;
    --bordure: #3e4755;
    --texte: #f5f7fa;
    --texte-secondaire: #b8c0cc;
    --accent: #3478f6;
    --accent-hover: #4b89f8;
    --succes: #2ecc71;
    --erreur: #e74c3c;
    --alerte: #f39c12;
    --rayon: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--fond);
    color: var(--texte);
    line-height: 1.5;
}

.conteneur {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.entete {
    background: var(--fond-carte);
    border-bottom: 1px solid var(--bordure);
    padding: 16px 0;
}

.entete-interieur {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--texte);
}
.logo:hover { color: var(--accent); }

.navigation {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.navigation a { color: var(--texte-secondaire); font-weight: 500; }
.navigation a:hover { color: var(--texte); }

.bouton-connexion {
    background: var(--accent);
    color: white !important;
    padding: 8px 18px;
    border-radius: 8px;
}
.bouton-connexion:hover { background: var(--accent-hover); }

.lien-deconnexion { color: var(--erreur) !important; }
.bouton-lien {
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.contenu-principal { padding: 32px 20px 60px; min-height: 60vh; }

.pied-de-page {
    border-top: 1px solid var(--bordure);
    padding: 20px 0;
    color: var(--texte-secondaire);
    font-size: 13px;
    text-align: center;
}

h1 { font-size: 28px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }

.sous-titre { color: var(--texte-secondaire); margin-bottom: 24px; }

.messages-flash { margin-bottom: 20px; }
.message {
    padding: 12px 16px;
    border-radius: var(--rayon);
    margin-bottom: 8px;
    font-size: 14px;
}
.message-success { background: rgba(46, 204, 113, 0.15); border: 1px solid var(--succes); color: var(--succes); }
.message-error { background: rgba(231, 76, 60, 0.15); border: 1px solid var(--erreur); color: var(--erreur); }
.message-warning { background: rgba(243, 156, 18, 0.15); border: 1px solid var(--alerte); color: var(--alerte); }

.grille-cartes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.carte {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 18px 20px;
}

.carte-joueur {
    display: block;
    color: var(--texte);
    transition: border-color 0.15s, background 0.15s;
}
.carte-joueur:hover {
    background: var(--fond-carte-hover);
    border-color: var(--accent);
    color: var(--texte);
}

.carte-titre { font-size: 13px; color: var(--texte-secondaire); margin-bottom: 4px; }
.carte-valeur { font-size: 26px; font-weight: bold; color: var(--accent); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    background: #173b70;
    color: #82b3ff;
    border: 1px solid #3568ad;
}

.tableau {
    width: 100%;
    border-collapse: collapse;
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    overflow: hidden;
}
.tableau-defilant {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--rayon);
}
.tableau th, .tableau td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--bordure);
    font-size: 14px;
}
.tableau th {
    background: #2b333e;
    color: var(--texte-secondaire);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
}
.tableau tr:last-child td { border-bottom: none; }
.tableau tr:hover td { background: rgba(255,255,255,0.02); }
.tableau tr.ligne-cliquable { cursor: pointer; }
.tableau tr.ligne-cliquable:hover td { background: rgba(52, 120, 246, 0.08); }

.photo-tournoi-apercu {
    display: block;
    width: min(360px, 100%);
    max-height: 240px;
    margin-bottom: 12px;
    object-fit: cover;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
}

.detail-tournoi {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.4fr);
    gap: 20px;
    align-items: start;
}
.detail-tournoi-photo img {
    display: block;
    width: 100%;
    max-height: 650px;
    object-fit: contain;
    border-radius: var(--rayon);
    background: #11161d;
}
.formulaire-photo-tournoi {
    margin-top: 18px;
}
.liste-informations {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px 18px;
}
.liste-informations dt { color: var(--texte-secondaire); }
.liste-informations dd { margin: 0; }

@media (max-width: 760px) {
    .detail-tournoi { grid-template-columns: 1fr; }
}

.bouton {
    display: inline-block;
    background: var(--accent);
    color: white !important;
    border: none;
    padding: 10px 20px;
    border-radius: 9px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}
.bouton:hover { background: var(--accent-hover); }
.bouton-compact {
    padding: 6px 10px;
    white-space: nowrap;
    font-size: 12px;
}
.bouton-secondaire { background: #475569; }
.bouton-secondaire:hover { background: #58677d; }
.bouton-google-sheet { background: #0f9d58; }
.bouton-google-sheet:hover { background: #0b8043; }
.google-sheet-configuration {
    max-width: 760px;
    margin: 28px auto;
    padding: 28px;
}
.etapes-google-sheet {
    display: grid;
    gap: 18px;
    margin: 24px 0;
    padding-left: 24px;
}
.adresse-service {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--bordure);
    border-radius: 8px;
    background: var(--fond);
}
.adresse-service code {
    overflow-wrap: anywhere;
}
.bouton-danger { background: var(--erreur); }
.bouton-danger:hover { background: #d04a4a; }

.barre-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

.formulaire { max-width: 640px; }
.champ { margin-bottom: 16px; }
.champ label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--texte-secondaire); font-size: 13px; }
.champ input, .champ select, .champ textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--bordure);
    background: #1d232b;
    color: var(--texte);
    font-size: 14px;
    font-family: inherit;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.ligne-champs {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}
.ligne-champs .champ {
    flex: 1 1 0;
    min-width: 0;
}
.ligne-champs .champ input,
.ligne-champs .champ select,
.ligne-champs .champ textarea {
    box-sizing: border-box;
}

.avis-confidentialite {
    background: rgba(52, 120, 246, 0.1);
    border: 1px solid var(--accent);
    border-radius: var(--rayon);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--texte-secondaire);
    margin-bottom: 24px;
}
.progression-synchronisation { margin-bottom: 20px; }
.progression-entete {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}
.progression-piste {
    width: 100%;
    height: 14px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #151a20;
    border: 1px solid var(--bordure);
}
.progression-barre {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--succes));
    transition: width 0.35s ease;
}

.profil-entete {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.profil-identite h1 { margin-bottom: 4px; }

.section { margin-bottom: 32px; }

.vide { color: var(--texte-secondaire); font-style: italic; }

.onglets-fiche {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--bordure);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.onglet-lien {
    background: none;
    border: none;
    color: var(--texte-secondaire);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.onglet-lien:hover { color: var(--texte); }
.onglet-lien.actif { color: var(--accent); border-bottom-color: var(--accent); }

/* En-tête de fiche joueur v2 : photo à gauche, classements à droite */
.profil-entete-v2 {
    display: flex;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.profil-photo-bloc {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.profil-photo {
    width: 100%;
    flex: 1 1 auto;
    min-height: 160px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--bordure);
}
.profil-photo-vide {
    width: 100%;
    flex: 1 1 auto;
    min-height: 160px;
    border-radius: 16px;
    border: 1px solid var(--bordure);
    background: var(--fond-carte);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: bold;
    color: var(--accent);
}
.profil-classements-bloc {
    flex: 1 1 420px;
    padding-top: 4px;
}

/* Accueil de la fiche : présentation compacte tenant sur un écran de bureau. */
.fiche-joueur-accueil {
    width: min(1500px, calc(100vw - 48px));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}
.fiche-joueur-accueil .profil-entete-v2 {
    flex-wrap: nowrap;
    gap: 24px;
    margin-bottom: 18px;
}
.fiche-joueur-accueil .profil-photo-bloc {
    flex-basis: 210px;
}
.fiche-joueur-accueil .profil-photo,
.fiche-joueur-accueil .profil-photo-vide {
    min-height: 180px;
    max-height: 285px;
}
.fiche-joueur-accueil .profil-photo-bloc h1 {
    font-size: 26px;
    margin-top: 9px !important;
}
.fiche-joueur-accueil .profil-photo-bloc .sous-titre {
    margin-bottom: 6px;
}
.fiche-joueur-accueil .profil-classements-bloc h2 {
    margin-bottom: 5px !important;
}
.fiche-joueur-accueil .profil-classements-bloc .grille-cartes {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 10px;
    margin-bottom: 11px !important;
}
.fiche-joueur-accueil .profil-classements-bloc .carte {
    padding: 13px 15px;
}
.fiche-joueur-accueil .profil-classements-bloc .carte-valeur {
    font-size: 25px;
}
.fiche-joueur-accueil .profil-classements-bloc .sous-titre {
    margin-bottom: 0;
}
.fiche-joueur-accueil > .tuiles-navigation {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
}
.fiche-joueur-accueil > .tuiles-navigation .tuile-onglet {
    min-height: 96px;
    padding: 15px 16px;
}
.fiche-joueur-accueil > .tuiles-navigation .tuile-titre {
    font-size: 15px;
}
.fiche-joueur-accueil > .tuiles-navigation .tuile-description {
    font-size: 12px;
    line-height: 1.4;
}

/* Navigation en tuiles (comme le tableau de bord AFPadel) */
.tuiles-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
    align-items: stretch;
}
.tuile-onglet {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 18px 20px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 92px;
    height: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
}
.tuile-onglet:hover { border-color: var(--accent); background: var(--fond-carte-hover); }
.tuile-onglet.actif { border-color: var(--accent); background: rgba(52, 120, 246, 0.12); }
.tuile-titre { font-size: 16px; font-weight: bold; color: var(--accent); }
.tuile-description { font-size: 13px; color: var(--texte-secondaire); }
.action-explication-tournoi {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}
.action-explication-tournoi .tuile-onglet {
    width: min(100%, 320px);
    min-height: 82px;
}

.grille-outil-tournoi {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1.2fr);
    gap: 22px;
    align-items: start;
}
.section-outil { margin: 26px 0; }
.grille-equipes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.equipe-inscrite {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.poule-bloc { margin: 18px 0; }
.tableau-compact th,
.tableau-compact td { padding: 7px 10px; }
.tableau tr.qualifie td {
    background: rgba(34, 197, 94, 0.09);
    color: #a7f3d0;
}
.match-outil {
    background: #202833;
    border: 1px solid var(--bordure);
    border-radius: 10px;
    padding: 12px;
    margin: 9px 0;
}
.match-outil.match-termine { border-color: rgba(34, 197, 94, 0.55); }
.match-equipes {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 9px;
    align-items: center;
    text-align: center;
}
.match-equipes span {
    color: var(--texte-secondaire);
    font-size: 12px;
}
.formulaire-score {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    align-items: end;
    margin-top: 10px;
}
.paire-score-auto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.saisie-sets {
    border: 1px solid var(--bordure);
    border-radius: 8px;
    padding: 8px;
    min-width: 0;
}
.saisie-sets legend {
    color: var(--texte-secondaire);
    font-size: 11px;
    padding: 0 5px;
}
.saisie-sets input {
    width: 100%;
    min-width: 0;
}
.formulaire-score > .bouton {
    grid-column: 1 / -1;
    width: 100%;
}
.formulaire-score-americano {
    grid-template-columns: minmax(0, 1fr);
}
.navigation-phases-tournoi {
    margin: 1.5rem 0;
}
.navigation-phases-tournoi .tuile-onglet {
    min-width: 190px;
}
.tuile-indisponible {
    cursor: default;
    opacity: 0.58;
}
.tuile-ma-poule {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}
.badge-ma-poule {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 0.72rem;
    white-space: nowrap;
}
.tuile-poule-finalisee {
    border-color: var(--succes);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}
.badge-poule-finalisee {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: var(--succes);
    color: #071d10;
    font-size: 0.72rem;
    white-space: nowrap;
}
.badge-tournoi-termine {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid #ff6b6b;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.18);
    color: #ff6b6b;
    font-size: 0.75rem;
    font-weight: 700;
    vertical-align: middle;
    white-space: nowrap;
}

.badge-messages {
    display: inline-flex;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.liste-contacts {
    display: grid;
    gap: 0.75rem;
    max-width: 760px;
    margin-top: 1.5rem;
}

.carte-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #46556a;
    border-radius: 0.75rem;
    background: #242b35;
    color: inherit;
    text-decoration: none;
}

.carte-contact:hover {
    border-color: #3b82f6;
}

.carte-contact small,
.contact-identifiant {
    display: block;
    margin-top: 0.2rem;
    color: #aebbd0;
}

.conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 820px;
    min-height: 240px;
    max-height: 60vh;
    margin: 1.25rem 0;
    padding: 1rem;
    overflow-y: auto;
    border: 1px solid #46556a;
    border-radius: 0.75rem;
    background: #161b22;
}

.bulle-message {
    max-width: min(75%, 620px);
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    overflow-wrap: anywhere;
}

.bulle-message p {
    margin: 0 0 0.35rem;
    white-space: pre-wrap;
}

.bulle-message time {
    color: #c2ccdb;
    font-size: 0.72rem;
}

.message-envoye {
    align-self: flex-end;
    background: #2563eb;
}

.message-recu {
    align-self: flex-start;
    background: #303a48;
}

.conversation-vide {
    margin: auto;
}

.formulaire-message {
    display: grid;
    gap: 0.65rem;
    max-width: 820px;
}

.formulaire-message textarea {
    resize: vertical;
}
.ancre-phase-tournoi,
#tableau-final {
    scroll-margin-top: 1.5rem;
}
.ancre-phase-tournoi:target,
#tableau-final:target {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
.formulaire-score label {
    color: var(--texte-secondaire);
    font-size: 11px;
}
.formulaire-score input { margin-top: 4px; }
.score-enregistre {
    text-align: center;
    color: #86efac;
    font-size: 20px;
    font-weight: bold;
    margin-top: 8px;
}
.score-enregistre small {
    display: block;
    color: var(--texte-secondaire);
    font-size: 12px;
    font-weight: normal;
}
.correction-score {
    margin-top: 10px;
    border-top: 1px solid var(--bordure);
    padding-top: 8px;
}
.correction-score summary {
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
}
.tableau-final-outil {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 16px;
    overflow-x: auto;
    align-items: center;
}
.tour-final-colonne { min-width: 260px; }
.tour-final-colonne h3 { text-align: center; }

@media (max-width: 640px) {
    .ligne-champs { flex-direction: column; align-items: stretch; }
    .profil-entete { flex-direction: column; }
    .profil-entete-v2 { flex-direction: column; align-items: center; text-align: center; }
    .profil-classements-bloc { width: 100%; }
    .grille-outil-tournoi { grid-template-columns: 1fr; }
    .formulaire-score { grid-template-columns: 1fr 1fr; }
    .saisie-sets { grid-column: 1 / -1; }
    .formulaire-score .score-detail,
    .formulaire-score button { grid-column: 1 / -1; }
    .action-explication-tournoi .tuile-onglet { width: 100%; }
}

@media (max-width: 900px) {
    .fiche-joueur-accueil {
        width: auto;
        margin-left: 0;
        transform: none;
    }
    .fiche-joueur-accueil .profil-entete-v2 {
        flex-wrap: wrap;
    }
    .fiche-joueur-accueil > .tuiles-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hero-photo {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    min-height: 100vh;
    background-image:
        linear-gradient(180deg, rgba(10,14,20,0.35) 0%, rgba(10,14,20,0.55) 55%, rgba(10,14,20,0.95) 100%),
        url('/static/img/hero-padel.jpg');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 70px 20px 50px;
    text-align: center;
    margin-top: -32px;
}
.hero-cartes {
    width: 100%;
    max-width: 1100px;
    margin: 0;
    align-self: flex-end;
}
.carte-hero {
    background: rgba(20, 24, 32, 0.72);
    backdrop-filter: blur(6px);
    border-color: rgba(255,255,255,0.14);
}
.hero-photo-overlay { max-width: 640px; }
.hero-titre {
    font-size: 40px;
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.7);
    margin-bottom: 10px;
}
.hero-tagline {
    font-size: 21px;
    color: var(--accent);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
    margin: 0 0 14px;
}
.hero-description {
    color: #e6e9ee;
    max-width: 520px;
    margin: 0 auto 26px;
    font-size: 15px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.bouton-hero {
    padding: 13px 28px;
    font-size: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.bouton-hero-secondaire {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(2px);
}
.bouton-hero-secondaire:hover { background: rgba(255,255,255,0.22); }

@media (max-width: 640px) {
    .hero-photo { min-height: 380px; padding: 48px 16px; }
    .hero-titre { font-size: 30px; }
    .hero-tagline { font-size: 17px; }
}

/* Calendrier mensuel (admin Saison) */
.calendrier-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.calendrier-entete h2 { margin: 0; min-width: 180px; text-align: center; }
.calendrier-grille {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.calendrier-jour-nom {
    text-align: center;
    color: var(--texte-secondaire);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    padding-bottom: 4px;
}
.calendrier-cellule {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: 8px;
    min-height: 100px;
    padding: 6px;
    font-size: 12px;
}
.calendrier-cellule.hors-mois { opacity: 0.45; }
.calendrier-cellule.aujourdhui { border-color: var(--accent); }
.calendrier-numero { font-weight: bold; margin-bottom: 4px; }
.calendrier-evenement {
    display: block;
    color: var(--texte);
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    padding: 2px 5px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calendrier-lien-jour { display: block; text-align: center; color: var(--texte-secondaire); font-size: 16px; }
.calendrier-lien-jour:hover { color: var(--accent); }

.guide-google-agenda {
    margin-bottom: 1.25rem;
    border: 1px solid #3b82f6;
    border-radius: 0.75rem;
    background: rgba(37, 99, 235, 0.08);
}

.connexion-google-agenda {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #46556a;
    border-radius: 0.75rem;
    background: #242b35;
}

.connexion-google-agenda p {
    margin: 0.35rem 0 0;
    color: var(--texte-secondaire);
}

.connexion-google-agenda .barre-actions {
    margin: 0;
}

.statut-google-connecte {
    color: #4ade80;
}

.guide-google-agenda summary {
    padding: 1rem 1.1rem;
    cursor: pointer;
    color: #9ec5ff;
    font-weight: 700;
}

.guide-google-contenu {
    padding: 0 1.1rem 1.1rem;
    line-height: 1.55;
}

.guide-google-contenu ol {
    padding-left: 1.4rem;
}

.guide-google-contenu li {
    margin-bottom: 0.75rem;
}

.adresse-service-google {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.adresse-service-google code {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--bordure);
    border-radius: 0.45rem;
    background: #111720;
    color: #fff;
    overflow-wrap: anywhere;
}

.bouton-copier-email {
    padding: 0.5rem 0.75rem;
}

@media (max-width: 800px) {
    .calendrier-grille { grid-template-columns: repeat(7, minmax(80px, 1fr)); overflow-x: auto; }
}

