/* Accueil : « Marées aujourd'hui » et annuaire des ports (maquette 17/10/2026) */
.home-today { padding-top: 4rem; padding-bottom: 4rem; background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%); }
.home-today .section-title { margin-bottom: .4rem; }
.ht-date { text-align: center; color: #0ea5e9; font-weight: 700; font-size: 1.1rem; margin: 0 0 1.75rem; }

/* --- Coefficient du jour --- */
.ht-coef { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem 2rem;
  max-width: 1100px; margin: 0 auto 1.75rem; padding: 1.25rem 1.75rem; background: #fff; border: 1px solid #e0f2fe;
  border-radius: 22px; box-shadow: 0 12px 34px rgba(14,165,233,.10); }
.ht-coef-main { display: flex; flex-direction: column; gap: .45rem; }
.ht-coef-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.ht-coef-values { display: inline-flex; align-items: center; gap: .5rem; }
.ht-coef-num { display: inline-block; min-width: 3.1rem; padding: .3rem .7rem; border-radius: 999px; color: #fff;
  font-weight: 800; font-size: 1.35rem; text-align: center; font-variant-numeric: tabular-nums; }
.ht-coef-sep { color: #94a3b8; font-size: .9rem; }
.lvl-gm { --lvl: #dc2626; } .lvl-fo { --lvl: #ea580c; } .lvl-mo { --lvl: #2563eb; } .lvl-pe { --lvl: #059669; }
.ht-coef-num { background: var(--lvl, #0ea5e9); }

.ht-gauge { min-width: 0; }
.ht-gauge-bar { position: relative; height: 10px; border-radius: 999px;
  background: linear-gradient(90deg, #059669 0 25%, #2563eb 25% 50%, #ea580c 50% 70%, #dc2626 70% 100%); opacity: .9; }
.ht-gauge-mark { position: absolute; top: 50%; width: 20px; height: 20px; margin-left: -10px; transform: translateY(-50%);
  border-radius: 50%; background: #fff; border: 4px solid var(--lvl); box-shadow: 0 2px 8px rgba(15,23,42,.25); }
.ht-gauge-labels { display: grid; grid-template-columns: 25% 25% 20% 30%; margin-top: .5rem; font-size: .75rem; color: #64748b; }
.ht-gauge-labels span { text-align: center; }

.ht-next-gm { display: flex; flex-direction: column; gap: .2rem; padding: .7rem 1rem; border-radius: 14px; background: #fef2f2;
  text-decoration: none; color: #991b1b; transition: background .2s; }
.ht-next-gm:hover { background: #fee2e2; }
.ht-next-gm-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #dc2626; }
.ht-next-gm-val { font-weight: 700; font-size: .95rem; }
.ht-next-gm-val i { font-size: .75rem; margin-left: .25rem; }
.ht-next-gm-val { white-space: normal; } .ht-next-gm-val i { white-space: nowrap; }

/* --- Version A : cartes --- */
.ht-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 1100px; margin: 0 auto; }
.ht-card { display: flex; flex-direction: column; gap: .55rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 18px;
  padding: 1.1rem 1.2rem; text-decoration: none; color: #2D3748; box-shadow: 0 6px 20px rgba(15,23,42,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.ht-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(14,165,233,.16); border-color: #7dd3fc; }
.ht-card-head { display: flex; flex-direction: column; padding-bottom: .55rem; border-bottom: 1px solid #f1f5f9; }
.ht-card-name { font-weight: 800; font-size: 1.12rem; color: #2D3748; }
.ht-card-dept { font-size: .8rem; color: #64748b; }
.ht-row { display: flex; flex-direction: column; gap: .3rem; }
.ht-type { font-size: .68rem; font-weight: 700; letter-spacing: .07em; color: #64748b; }
.ht-high .ht-type { color: #0284c7; }
.ht-times { display: flex; flex-wrap: wrap; gap: .35rem; }
.ht-time { display: inline-block; padding: .2rem .55rem; border-radius: 8px; background: #f1f5f9; font-weight: 700;
  font-size: 1rem; color: #2D3748; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.ht-high .ht-time { background: #e0f2fe; color: #075985; }
.ht-time.is-past { opacity: .4; }
.ht-time.is-next { background: #0ea5e9; color: #fff; box-shadow: 0 4px 12px rgba(14,165,233,.35); }
.ht-note { text-align: center; color: #64748b; font-size: .88rem; margin-top: 1.25rem; }
.ht-legend .ht-time { font-size: .75rem; padding: .1rem .45rem; margin-right: .35rem; }

/* --- Version B : frise de la journée --- */
.hf-list { max-width: 1100px; margin: 0 auto; background: #fff; border: 1px solid #e0f2fe; border-radius: 22px;
  box-shadow: 0 12px 34px rgba(14,165,233,.08); padding: .75rem 1.5rem 1rem; }
.hf-scale, .hf-row { display: grid; grid-template-columns: 11rem 1fr; gap: 1.25rem; align-items: center; }
.hf-scale { font-size: .72rem; color: #94a3b8; font-weight: 600; padding: .25rem 0; }
.hf-scale-track { position: relative; height: 1rem; }
.hf-scale-track i { position: absolute; top: 0; font-style: normal; transform: translateX(-50%); }
.hf-scale-track i:first-child { transform: none; } .hf-scale-track i:last-child { transform: translateX(-100%); }
.hf-row { padding: .7rem 0; border-top: 1px solid #f1f5f9; text-decoration: none; color: #2D3748; border-radius: 12px; transition: background .2s; }
.hf-row:hover { background: #f8fbff; }
.hf-row:hover .hf-lab { background: #f8fbff; }
.hf-port { display: flex; flex-direction: column; }
.hf-name { font-weight: 800; color: #2D3748; }
.hf-row:hover .hf-name { color: #0ea5e9; }
.hf-dept { font-size: .78rem; color: #64748b; }
.hf-track { position: relative; height: 56px; background:
  linear-gradient(90deg, transparent calc(25% - 1px), #e2e8f0 25%, transparent calc(25% + 1px), transparent calc(50% - 1px), #e2e8f0 50%, transparent calc(50% + 1px), transparent calc(75% - 1px), #e2e8f0 75%, transparent calc(75% + 1px)),
  linear-gradient(180deg, transparent 27px, #bae6fd 27px, #bae6fd 29px, transparent 29px); }
.hf-now { display: none; position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #f97316; z-index: 1; }
.hf-tide { position: absolute; top: 0; bottom: 0; width: 0; z-index: 2; }
.hf-dot { position: absolute; left: -7px; width: 14px; height: 14px; border-radius: 50%; }
.hf-lab { position: absolute; left: 0; transform: translateX(-50%); font-size: .82rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; background: #fff; padding: 0 .2rem; border-radius: 4px; z-index: 3; }
.hf-high .hf-dot { top: 21px; background: #0ea5e9; box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(14,165,233,.5); }
.hf-high .hf-lab { top: 0; color: #075985; }
.hf-low .hf-dot { top: 21px; background: #fff; border: 3px solid #64748b; box-shadow: 0 0 0 3px #fff; }
.hf-low .hf-lab { bottom: 0; color: #475569; }
.hf-tide.is-past { opacity: .4; }
.hf-tide.is-next .hf-lab { background: #0ea5e9; color: #fff; padding: 0 .35rem; border-radius: 6px; }
.hf-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; padding-top: .9rem; border-top: 1px solid #f1f5f9; font-size: .78rem; color: #64748b; font-weight: 600; }
.hf-key { position: relative; display: inline-flex; align-items: center; gap: .45rem; }
.hf-key .hf-dot { position: static; width: 11px; height: 11px; box-shadow: none; }
.hf-key.hf-low .hf-dot { border-width: 2px; }
.hf-key-now::before { content: ''; width: 2px; height: 14px; background: #f97316; }

/* --- Annuaire des ports --- */
.home-ports .section-title { margin-bottom: 2rem; }
.hp-list { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: .75rem; }
.hp-region { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; box-shadow: 0 6px 20px rgba(15,23,42,.04); transition: border-color .2s, box-shadow .2s; }
.hp-region:hover, .hp-region[open] { border-color: #bae6fd; box-shadow: 0 10px 28px rgba(14,165,233,.10); }
.hp-region > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center;
  gap: .25rem 1rem; padding: 1.1rem 1.4rem; }
.hp-region > summary::-webkit-details-marker { display: none; }
.hp-region > summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #0ea5e9; font-size: .8rem;
  width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #f0f9ff; transition: transform .2s; }
.hp-region[open] > summary::after { transform: rotate(180deg); }
.hp-region > summary:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; border-radius: 18px; }
.hp-region-name { font-weight: 800; font-size: 1.15rem; color: #2D3748; }
.hp-region-depts { color: #64748b; font-size: .92rem; }
.hp-region-count { font-weight: 700; color: #0369a1; font-size: .82rem; white-space: nowrap; background: #e0f2fe; padding: .25rem .7rem; border-radius: 999px; }
.hp-region-body { padding: .25rem 1.4rem 1.3rem; display: grid; gap: 1.1rem; }
.hp-dept { background: #f8fafc; border-radius: 14px; padding: .9rem 1.1rem; }
.hp-dept-name { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; color: #2D3748; text-decoration: none; margin-bottom: .5rem; }
.hp-dept-name::after { content: '\f061'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .7rem; color: #0ea5e9; }
.hp-dept-name:hover { color: #0ea5e9; }
.hp-ports { list-style: none; margin: 0; padding: 0; columns: 4 11rem; column-gap: 1.5rem; }
.hp-ports li { break-inside: avoid; padding: .15rem 0; }
.hp-ports a { color: #334155; text-decoration: none; font-size: .94rem; }
.hp-ports a:hover { color: #0ea5e9; text-decoration: underline; }

@media (max-width: 900px) {
  .ht-grid { grid-template-columns: repeat(2, 1fr); }
  .ht-coef { grid-template-columns: auto 1fr; }
  .ht-next-gm { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (max-width: 768px) {
  .home-today { padding: 2.5rem 1rem; }
  .hp-region > summary { grid-template-columns: 1fr auto auto; padding: 1rem 1.1rem; }
  .hp-region-depts { grid-column: 1 / -1; grid-row: 2; font-size: .85rem; }
  .hp-region-body { padding: 0 .8rem .9rem; }
  .hp-dept { padding: .8rem .9rem; }
  .hp-ports { columns: 2; column-gap: 1rem; }
  .hp-ports li { padding: .3rem 0; }
}
@media (max-width: 600px) {
  .home-today .container, .home-ports .container { padding: 0; }
  .ht-coef { grid-template-columns: 1fr; padding: 1rem 1.1rem; gap: .9rem; }
  .ht-coef-main { flex-direction: row; justify-content: space-between; align-items: center; }
  .ht-next-gm { flex-direction: column; align-items: flex-start; }
  .ht-gauge-labels { font-size: .66rem; }
  .ht-grid { grid-template-columns: 1fr; gap: .5rem; }
  .ht-card { gap: .4rem; padding: .8rem 1rem; }
  .ht-card-head { flex-direction: row; align-items: baseline; gap: .5rem; padding-bottom: .45rem; }
  .ht-card-name { font-size: 1.02rem; }
  .ht-card-dept { font-size: .75rem; }
  .ht-row { flex-direction: row; align-items: center; gap: .5rem; }
  .ht-type { width: 5.4rem; flex: none; font-size: .64rem; }
  .ht-times { flex-wrap: nowrap; }
  .ht-time { font-size: .95rem; padding: .15rem .5rem; }
  .ht-gauge-labels { letter-spacing: -.01em; }
  .hf-list { padding: .5rem .9rem .9rem; border-radius: 18px; }
  .hf-scale, .hf-row { grid-template-columns: 1fr; gap: .2rem; }
  .hf-scale > span:first-child { display: none; }
  .hf-port { flex-direction: row; align-items: baseline; gap: .5rem; }
  .hf-lab { font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) { .ht-card, .hp-region > summary::after, .hf-row { transition: none; } }

/* --- Hero resserré (maquette) --- */
.hero--compact .hero-title { margin-bottom: .9rem; }
.hero-coef { display: inline-flex; align-items: center; gap: .5rem; margin: 0 auto 1.4rem; padding: .45rem .6rem .45rem 1rem;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #fff;
  text-decoration: none; font-weight: 600; backdrop-filter: blur(6px); transition: background .2s; }
.hero-coef:hover { background: rgba(255,255,255,.26); }
.hero-coef-label { font-size: .95rem; }
.hero-coef-num { min-width: 2.3rem; padding: .12rem .5rem; border-radius: 999px; background: #fff; color: var(--lvl); font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.hero-coef-sep { font-size: .85rem; opacity: .85; }
.hero-coef-lvl { font-size: .88rem; opacity: .95; }
.hero-coef i { font-size: .7rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.2); }
@media (max-width: 768px) {
  .hero.hero--compact { min-height: 0; padding: 2.2rem 1rem 4.5rem; }
  .hero--compact .hero-title { font-size: 2rem; line-height: 1.2; margin-bottom: .8rem; }
  .hero--compact .hero-subtitle { font-size: .95rem; line-height: 1.5; margin-bottom: 1.4rem; }
  .hero-coef { margin-bottom: 1rem; padding: .35rem .45rem .35rem .8rem; gap: .4rem; }
  .hero-coef-label, .hero-coef-lvl { font-size: .85rem; }
  .hero--compact .hero-cities { margin-top: 1.4rem; padding: 0; }
  .hero--compact .cities-title { margin-bottom: .8rem; font-size: .78rem; }
  .hero--compact .cities-grid { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity;
    padding: .2rem 1rem .6rem; margin: 0 -1rem; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 2rem), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 2rem), transparent 100%); }
  .hero--compact .cities-grid::-webkit-scrollbar { display: none; }
  .hero--compact .city-pill { flex: none; scroll-snap-align: start; }
}
@media (max-width: 480px) { .hero-coef-lvl { display: none; } }
