:root {
    --ocean: #135a60;
    --vague: #3fb8af;
    --ecume: #fdf6f3;
    --sable: #ffc29a;
    --texte: #2a2440;
    --nuit: #2e2350;
    --rose: #e0687f;
    --corail: #f6956f;
    --ciel: radial-gradient(ellipse 70% 55% at 75% 100%, rgba(255, 196, 130, 0.6), transparent 70%),
            linear-gradient(180deg, var(--nuit) 0%, #5a3b73 30%, #a64d82 58%, var(--rose) 80%, var(--corail) 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--texte);
    background: var(--ecume);
    line-height: 1.6;
}
a { color: inherit; }

/* En-tête */
header {
    background: var(--ciel);
    text-shadow: 0 1px 8px rgba(46, 35, 80, 0.35);
    color: #fff;
    padding: 1.2rem 1.5rem 6rem;
    position: relative;
    overflow: hidden;
}
nav {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.logo { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; text-decoration: none; }
.logo span { color: var(--sable); }
.nav-liens { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 0.65rem 1.3rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.btn-clair { background: #fff; color: var(--ocean); }
.btn-contour { border: 2px solid #fff; color: #fff; }
.btn-sable { background: var(--sable); color: var(--ocean); }

.hero {
    max-width: 1000px;
    margin: 4rem auto 0;
    text-align: center;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.15; margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 0 auto 2rem; opacity: 0.95; }
.hero .actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

.vague {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
}

/* Contenu */
main { max-width: 1000px; margin: 0 auto; padding: 3rem 1.5rem; }
section { margin-bottom: 4rem; }
h2 { font-size: 1.8rem; color: var(--ocean); margin-bottom: 1.5rem; text-align: center; }

.cartes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}
.carte {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 18px rgba(46, 35, 80, 0.08);
}
.carte .icone { font-size: 2rem; margin-bottom: 0.5rem; }
.carte h3 { color: var(--ocean); margin-bottom: 0.4rem; }

.chiffres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    text-align: center;
}
.chiffre {
    background: var(--ocean);
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem 1rem;
}
.chiffre strong { display: block; font-size: 2.4rem; color: var(--sable); }

.ia {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 18px rgba(46, 35, 80, 0.08);
    border-left: 6px solid var(--vague);
}
.ia blockquote {
    background: var(--ecume);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
    font-style: italic;
}
.ia code {
    background: var(--ocean);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    word-break: break-all;
}
.ia ol { margin: 1rem 0 0 1.3rem; }

.appel { text-align: center; }
.appel p { margin-bottom: 1.5rem; }
.appel .btn-clair { background: var(--ocean); color: #fff; }

footer {
    background: var(--ocean);
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}
footer a { color: var(--sable); }

header.compact { padding-bottom: 4.5rem; }
.titre-page {
    max-width: 1000px;
    margin: 2rem auto 0;
    text-align: center;
}
.titre-page h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.2; }
.titre-page p { opacity: 0.95; margin-top: 0.4rem; }

.boite {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 18px rgba(46, 35, 80, 0.08);
    margin-bottom: 2rem;
}
.boite-etroite { max-width: 460px; margin-left: auto; margin-right: auto; }
.boite h2 { text-align: left; font-size: 1.4rem; margin-bottom: 1rem; }

/* Formulaires */
.formulaire label { display: block; font-weight: 600; margin: 1rem 0 0.3rem; color: var(--ocean); }
.formulaire input[type="text"],
.formulaire input[type="email"],
.formulaire input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #eddde3;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--ecume);
    transition: border-color 0.15s ease;
}
.formulaire input:focus { outline: none; border-color: var(--vague); background: #fff; }
.formulaire button, .bouton {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem 1.3rem;
    border: none;
    border-radius: 999px;
    background: var(--ocean);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.formulaire button:hover, .bouton:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.bouton-secondaire { width: auto; background: #fff; color: var(--ocean); border: 2px solid var(--ocean); }
.lien-bas { text-align: center; margin-top: 1.2rem; }
.lien-bas a { color: var(--ocean); font-weight: 700; }

/* Messages */
.message { padding: 0.8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 600; }
.message-erreur { background: #fde8e8; color: #9b1c1c; }
.message-ok { background: #e3f7ec; color: #11643a; }

/* Tableau des sessions */
.tableau { width: 100%; overflow-x: auto; }
.tableau table { width: 100%; border-collapse: collapse; }
.tableau th, .tableau td { padding: 0.7rem 0.8rem; text-align: left; border-bottom: 1px solid #f3e7ec; }
.tableau th { color: var(--ocean); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.badge-ia { background: var(--vague); color: #fff; }
.badge-site { background: var(--sable); color: var(--ocean); }

/* Clé MCP */
.jeton {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: none;
    background: var(--ocean);
    color: #fff;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9rem;
}
.alerte { color: #9b1c1c; font-weight: 600; margin: 0.6rem 0 1rem; }
.boite ol { margin: 1rem 0 0 1.3rem; }
.vide { text-align: center; padding: 1rem; }

.grille-spots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.spot h3 { color: var(--ocean); font-size: 1.25rem; }
.spot .ville { color: #6b6580; margin-bottom: 0.8rem; }
.previsions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.8rem 0; }
.jour { background: var(--ecume); border-radius: 12px; padding: 0.6rem; text-align: center; font-size: 0.9rem; }
.jour strong { display: block; color: var(--ocean); }
.jour .houle { font-size: 1.3rem; font-weight: 800; color: var(--ocean); }
.chargement { color: #6b6580; font-style: italic; font-size: 0.9rem; grid-column: 1 / -1; }
.indicateurs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.pastille { padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.pastille-vert { background: #e3f7ec; color: #11643a; }
.pastille-orange { background: #fff1d6; color: #8a5300; }
.pastille-rouge { background: #fde8e8; color: #9b1c1c; }
.pastille-gris { background: #f7eff2; color: #575170; }
.observation { font-size: 0.9rem; color: #575170; border-left: 3px solid var(--vague); padding-left: 0.6rem; margin-top: 0.6rem; }
.note { font-size: 0.85rem; color: #6b6580; text-align: center; margin-top: 1rem; }

.formulaire fieldset { border: none; margin-bottom: 1.5rem; }
.formulaire legend { font-size: 1.2rem; font-weight: 800; color: var(--ocean); margin-bottom: 0.3rem; }
.formulaire select,
.formulaire input[type="date"],
.formulaire input[type="time"],
.formulaire input[type="number"],
.formulaire textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #eddde3;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--ecume);
}
.formulaire textarea { resize: vertical; }
.ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.8rem; }
.choix { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.choix label {
    display: inline-flex; align-items: center; gap: 0.4rem; margin: 0;
    padding: 0.45rem 0.9rem; border: 2px solid #eddde3; border-radius: 999px;
    font-weight: 600; cursor: pointer; background: var(--ecume);
}
.choix input { accent-color: var(--ocean); }

.actions-compte { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.actions-compte .bouton { width: auto; margin-top: 0; text-decoration: none; display: inline-block; }
.chiffres-compte { margin-bottom: 2rem; }

.outils-spots { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.outils-spots .bouton { width: auto; margin-top: 0; }
.recherche { display: flex; flex: 1 1 320px; gap: 0.5rem; }
.recherche input, #filtre-pays {
    flex: 1; padding: 0.7rem 1rem; border: 2px solid #eddde3; border-radius: 999px;
    font-size: 1rem; font-family: inherit; background: var(--ecume);
}
#filtre-pays { flex: 0 0 auto; }
.distance { font-weight: 700; color: var(--ocean); }
#resultat-lieu .spot { background: var(--ecume); border-radius: 16px; padding: 1rem 1.2rem; }
.lien-geo { background: none; border: none; color: var(--ocean); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; font-family: inherit; font-size: 0.95rem; margin-top: 0.4rem; }

.formulaire button.lien-geo {
    width: auto; margin: 0.5rem 0 0; padding: 0.4rem 0.9rem;
    background: var(--ecume); color: var(--ocean);
    border: 2px solid #eddde3; border-radius: 999px;
    font-size: 0.9rem; text-decoration: none;
}

@media (max-width: 600px) {
    header { padding: 0.9rem 1rem 4rem; }
    header.compact { padding-bottom: 3.5rem; }
    nav { gap: 0.6rem; }
    .logo { font-size: 1.35rem; }
    .nav-liens { gap: 0.4rem; width: 100%; }
    .nav-liens .btn { padding: 0.45rem 0.8rem; font-size: 0.85rem; border-width: 1.5px; }
    .hero { margin-top: 2rem; }
    .hero p { font-size: 1rem; }
    .titre-page { margin-top: 1.2rem; }
    .vague { height: 45px; }

    main { padding: 1.5rem 1rem; }
    section { margin-bottom: 2.5rem; }
    h2 { font-size: 1.45rem; }
    .boite { padding: 1.3rem 1.1rem; border-radius: 16px; }

    .chiffres { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .chiffre { padding: 1rem 0.6rem; font-size: 0.85rem; }
    .chiffre strong { font-size: 1.7rem; }

    .ligne { grid-template-columns: 1fr 1fr; gap: 0.6rem; }

    .outils-spots .bouton, .recherche, #filtre-pays { width: 100%; flex: 1 1 100%; }
    .recherche { flex-wrap: wrap; }
    .recherche input { flex: 1 1 100%; }
    .recherche .bouton { width: 100%; }
    .grille-spots { grid-template-columns: 1fr; }

    .tableau table, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
    .tableau tr:first-child { display: none; }
    .tableau tr { background: var(--ecume); border-radius: 14px; padding: 0.6rem 0.9rem; margin-bottom: 0.7rem; }
    .tableau td { border: none; padding: 0.2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
    .tableau td::before { content: attr(data-label); font-weight: 700; color: var(--ocean); text-align: left; }

    .actions-compte .bouton { width: 100%; text-align: center; }
    .jeton { font-size: 0.75rem; }
}

[hidden] { display: none !important; }

.formulaire legend small { font-size: 0.8em; font-weight: 600; }
.facultatif { color: #6b6580; }
.obligatoire { color: #c2410c; }

/* Champs obligatoires */
.etoile { color: #c2410c; font-weight: 800; }
.note-etoile { font-size: 0.9rem; color: #6b6580; margin-bottom: 0.5rem; }

nav { flex-wrap: nowrap; }
header { overflow: visible; position: relative; z-index: 10; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--sable); }
.menu-icone, .menu-icone::before, .menu-icone::after {
    display: block; width: 18px; height: 2px; border-radius: 2px;
    background: currentColor; transition: transform 0.2s, background 0.2s;
}
.menu-icone { position: relative; }
.menu-icone::before, .menu-icone::after { content: ""; position: absolute; left: 0; }
.menu-icone::before { top: -6px; }
.menu-icone::after { top: 6px; }
.menu[open] .menu-icone { background: transparent; }
.menu[open] .menu-icone::before { transform: translateY(6px) rotate(45deg); }
.menu[open] .menu-icone::after { transform: translateY(-6px) rotate(-45deg); }

.menu-liste {
    position: absolute; right: 0; top: calc(100% + 0.6rem);
    width: 280px; max-height: calc(100vh - 110px); overflow-y: auto;
    background: var(--ciel);
    color: #fff; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    padding: 0.9rem; display: flex; flex-direction: column; gap: 0.5rem;
    z-index: 50; transform-origin: top right;
    animation: menu-entree 0.18s ease-out;
}
@keyframes menu-entree { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: none; } }
.menu-titre {
    margin: 0.5rem 0.4rem 0; font-size: 0.72rem; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7);
}
.menu-profil {
    text-align: center; padding: 0.2rem 0 0.6rem; font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.menu-liste a, .menu-liste button {
    display: block; width: 100%; text-align: center;
    padding: 0.65rem 1.3rem; min-height: 44px; border-radius: 999px;
    border: 2px solid #fff; background: transparent; color: #fff;
    font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.menu-liste a:hover, .menu-liste button:hover, .menu-liste a:focus-visible, .menu-liste button:focus-visible {
    transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.12); outline: none;
}
.menu-liste a.actif { background: #fff; color: var(--ocean); }
.menu-liste .menu-fort { background: var(--sable); border-color: var(--sable); color: var(--ocean); }
.menu-liste .menu-fort:hover, .menu-liste .menu-fort:focus-visible { background: var(--sable); }
.menu-liste #installer-appli { background: var(--sable); border-color: var(--sable); color: var(--ocean); }
.menu-liste .menu-sortie { margin-top: 0.4rem; border-color: rgba(255, 255, 255, 0.45); color: rgba(255, 255, 255, 0.85); }

@media (max-width: 600px) {
    .menu summary { padding: 0.5rem 1rem; font-size: 0.95rem; }
    .menu-liste { width: min(290px, calc(100vw - 2rem)); }
    body.menu-ouvert::after {
        content: ""; position: fixed; inset: 0; background: rgba(46, 35, 80, 0.5); z-index: 5;
        animation: menu-fond 0.18s ease-out;
    }
    @keyframes menu-fond { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .menu-liste, body.menu-ouvert::after { animation: none; } }

.btn-sable { background: linear-gradient(135deg, var(--sable), var(--corail)); color: var(--nuit); }
.btn-clair { color: var(--nuit); }
.btn, .menu-liste a, .menu-liste button { text-shadow: none; }
h2 { color: var(--ocean); }
.logo span { color: var(--sable); }
::selection { background: var(--rose); color: #fff; }

footer .equipe { margin-top: 0.4rem; font-size: 0.95rem; }
footer .equipe strong { color: var(--sable); }

.mesure-balise { margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: #eef7f6; color: var(--ocean); font-size: 0.92rem; }

.sous-titre-balise { color: #6b6580; margin: -0.6rem 0 1rem; font-size: 0.92rem; }
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.tuile { background: #eef7f6; border-radius: 14px; padding: 0.7rem 0.8rem; font-size: 0.85rem; color: #575170; }
.tuile strong { display: block; font-size: 1.25rem; color: var(--ocean); }
.observations { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: 0.45rem; }
.observations li { background: #fff7f1; border-left: 4px solid var(--corail); border-radius: 10px; padding: 0.6rem 0.8rem; }
.graphique { margin-bottom: 1.2rem; }
.graphique h3 { font-size: 1rem; color: var(--ocean); margin-bottom: 0.4rem; }
.graphique svg { width: 100%; height: auto; display: block; overflow: visible; }
.graphique .axe { font-size: 11px; fill: #6b6580; font-family: inherit; }
.legende { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.85rem; color: #575170; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; }
.deux-graphiques { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
.repartition { margin-bottom: 1rem; }
.repartition-titre { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.3rem; }
.barre { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: #f3e7ec; }
.barre span { display: block; height: 100%; }
.trace { max-width: 260px; }
.autres-sessions summary { cursor: pointer; font-weight: 700; color: var(--ocean); }
.autres-sessions ul { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.3rem; }
.autres-sessions a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.8rem; border-radius: 10px; background: #f7eff2; text-decoration: none; color: var(--texte); }
.autres-sessions a span { color: #6b6580; }
@media (max-width: 600px) {
    .tuiles { grid-template-columns: repeat(2, 1fr); }
    .deux-graphiques { grid-template-columns: 1fr; }
    .trace { max-width: 240px; margin: 0 auto; }
    .graphique .axe { font-size: 17px; }
}
.graphique .unite { font-weight: 700; fill: #575170; }
.tuiles-simples { grid-template-columns: repeat(4, 1fr); }
.tuiles-simples .tuile { text-align: center; }
.details-session { margin: 0.5rem 0 1rem; }
.details-session > summary { cursor: pointer; font-weight: 700; color: var(--ocean); margin-bottom: 0.8rem; }
.detail-chiffres { font-size: 0.85rem; color: #6b6580; }
@media (max-width: 600px) { .tuiles-simples { grid-template-columns: repeat(2, 1fr); } }
