/* ══════════════════════════════════════════════════════
   PANIER COLLECTION MARINE — CSS COMPLET
   Hero : composition illustrée (créatures marines détourées) sur fond
   bleu marine profond, touches dorées. Configurateur : blanc/bleu
   nuit/doré, clair et épuré.
══════════════════════════════════════════════════════ */

:root {
    /* Configurateur (sections claires) */
    --mar-bg:        #F3F6F7;
    --mar-bg-2:      #E7EEF0;
    --mar-card:       #FFFFFF;
    --mar-ink:        #0F1F30;
    --mar-ink-soft:   rgba(15,31,48,.68);
    --mar-primary:    #1B4B66;
    --mar-primary-h:  #123449;
    --mar-secondary:  #7C93A0;
    --mar-gold:       #C6A15B;
    --mar-gold-d:     #9C7A2C;
    --mar-border:     rgba(15,31,48,.14);
    --mar-border-h:   rgba(27,75,102,.45);
    --mar-tint:       rgba(198,161,91,.14);

    /* Hero (fond sombre) */
    --mar-navy:        #0F1F30;
    --mar-navy-2:      #16304F;
    --mar-ivory:        #F4E9D8;
    --mar-ivory-soft:   rgba(244,233,216,.72);
    --mar-gold-line:    rgba(198,161,91,.5);
}

.marine-page {
    font-family: 'Inter', sans-serif;
    color: var(--mar-ink);
    background: var(--mar-bg);
    -webkit-font-smoothing: antialiased;
}

/* ────────────────────────────────────────
   HERO — composition illustrée
──────────────────────────────────────── */
.hero-marine {
    position: relative; width: 100%; min-height: 86vh;
    display: flex; align-items: center; overflow: hidden;
    background:
        linear-gradient(180deg, rgba(15,31,48,.15) 0%, rgba(15,31,48,.35) 100%),
        url('../assets/img/marin/hero-fond-aquarium.webp') center center / cover no-repeat;
}

.hero-marine__prop {
    position: absolute; pointer-events: none;
    filter: drop-shadow(0 20px 34px rgba(0,0,0,.5));
    z-index: 2; animation: mar-propIn 1s ease-out both;
}
@keyframes mar-propIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; } }

.hero-marine__coquille-badge {
    position: absolute; right: -10px; bottom: -6px; width: 48px; height: 48px; z-index: 6;
    transform: rotate(-10deg); filter: drop-shadow(0 8px 12px rgba(0,0,0,.45));
}
.hero-marine__coquille-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }

.hero-marine__prop img { width: 100%; height: auto; display: block; }

/* bulles qui remontent */
.bulle-container { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.bulle {
    position: absolute; bottom: -30px; border-radius: 50%;
    border: 1px solid rgba(225,238,243,.6);
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.5), rgba(255,255,255,0) 65%);
    animation: mar-bulle-monte linear infinite;
}
.bulle--or {
    border-color: rgba(198,161,91,.5);
    background: radial-gradient(circle at 35% 30%, rgba(244,224,180,.55), rgba(244,224,180,0) 65%);
}
@keyframes mar-bulle-monte {
    0%   { transform: translate(0,0); opacity: 0; }
    10%  { opacity: .85; }
    50%  { transform: translate(12px,-320px); }
    100% { transform: translate(-8px,-680px); opacity: 0; }
}

/* poissons qui traversent le hero — wrapper (position/bob) + corps (ondulation) */
.poissons-container { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.poisson-nage {
    position: absolute;
    animation-name: mar-nage-droite, mar-bob; animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
}
.poisson-nage.inverse { animation-name: mar-nage-gauche, mar-bob; }
@keyframes mar-nage-droite { from { left: -220px; } to { left: 110%; } }
@keyframes mar-nage-gauche { from { left: 110%; } to { left: -220px; } }
@keyframes mar-bob { 0%,100% { margin-top: 0; } 50% { margin-top: -10px; } }

.poisson-body {
    width: 100%; height: 100%; background-size: contain; background-repeat: no-repeat;
    filter: drop-shadow(0 10px 14px rgba(0,0,0,.35));
    animation-name: mar-wiggle; animation-timing-function: ease-in-out; animation-iteration-count: infinite;
}
.poisson-nage.inverse .poisson-body { animation-name: mar-wiggle-inverse; }
@keyframes mar-wiggle {
    0%,100% { transform: perspective(300px) rotateY(0deg); }
    50%     { transform: perspective(300px) rotateY(14deg); }
}
@keyframes mar-wiggle-inverse {
    0%,100% { transform: perspective(300px) scaleX(-1) rotateY(0deg); }
    50%     { transform: perspective(300px) scaleX(-1) rotateY(-14deg); }
}

/* reef en 3 calques de profondeur, de part et d'autre du calque poissons (z-index: 3) :
   --back (z-index 2) est DERRIÈRE les poissons → ils passent devant.
   --main (z-index 4) porte les gros bouquets aux coins → les poissons passent derrière à l'approche des bords.
   --fg   (z-index 6) reste toujours devant, au plus près de la "vitre", pour un effet de parallaxe. */
.hero-marine__reef { position: absolute; left: 0; bottom: 0; width: 100%; pointer-events: none; }
.hero-marine__reef--back { height: 260px; z-index: 2; }
.hero-marine__reef--main { height: 500px; z-index: 4; }
.hero-marine__reef--fg   { height: 380px; z-index: 6; }

.reef-item { position: absolute; bottom: -18px; display: block; filter: drop-shadow(0 16px 22px rgba(0,0,0,.55)); }
.reef-item img { width: 100%; height: auto; display: block; }

/* calque arrière : fougères discrètes, légèrement voilées, que les poissons croisent devant */
.reef-back-1 { left: 15%; width: 90px; opacity: .6; transform-origin: bottom center; animation: mar-sway 7.6s ease-in-out infinite; }
.reef-back-2 { right: 17%; width: 100px; opacity: .6; transform-origin: bottom center; animation: mar-sway 8.2s ease-in-out infinite reverse; }

/* calque principal : les deux grands bouquets composés (feuilles + coraux + roche) */
.reef-main-left  { left: -30px; width: 560px; bottom: -26px; }
.reef-main-right { right: 26px; width: 560px; bottom: -26px; }

/* calque avant : corail et roche qui débordent devant les poissons, tout près du bord */
.reef-fg-left-2  { left: 18px;  width: 130px; bottom: -16px; }
.reef-fg-right-2 { right: 44px; width: 150px; bottom: -16px; }
.reef-fg-etoile  { left: 260px; width: 52px;  bottom: -6px; }

@keyframes mar-sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

@media (max-width: 960px) {
    .hero-marine__reef--back { height: 190px; }
    .hero-marine__reef--main { height: 360px; }
    .hero-marine__reef--fg   { height: 280px; }
    .reef-back-1 { width: 62px; }
    .reef-back-2 { width: 70px; }
    .reef-main-left, .reef-main-right { width: 380px; }
    .reef-fg-left-2 { width: 92px; left: 10px; }
    .reef-fg-right-2 { width: 106px; right: 20px; }
    .reef-fg-etoile { width: 40px; left: 180px; }
}
@media (max-width: 560px) {
    .hero-marine__reef--back { height: 130px; }
    .hero-marine__reef--main { height: 250px; }
    .hero-marine__reef--fg   { height: 190px; }
    .reef-main-left, .reef-main-right { width: 260px; }
    .reef-fg-left-2 { width: 64px; }
    .reef-fg-right-2 { width: 74px; }
    .reef-fg-etoile { width: 28px; left: 128px; }
}
@media (prefers-reduced-motion: reduce) {
    .poisson-nage, .poisson-body, .reef-item, .bulle { animation: none; opacity: 1; }
}

.hero-marine__inner {
    position: relative; z-index: 4; width: 100%; max-width: 1200px; margin: 0 auto;
    padding: 120px 60px; display: flex; align-items: center; gap: 64px;
}
.hero-marine__content { flex: 1; }
.hero-marine__visual { flex: 0 0 380px; position: relative; animation: mar-slideUp .8s ease-out .5s both; }
.hero-marine__img-wrap { position: relative; border-radius: 4px; overflow: visible; }
.hero-marine__img-wrap > img {
    width: 100%; height: 440px; object-fit: cover; display: block; border-radius: 4px;
    border: 1px solid var(--mar-gold-line); box-shadow: 0 30px 60px rgba(0,0,0,.5);
}

.hero-marine__img-seal {
    position: absolute; bottom: -18px; left: -18px; width: 88px; height: 88px; border-radius: 50%;
    background: var(--mar-navy); color: var(--mar-ivory); display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    box-shadow: 0 0 0 1px var(--mar-gold), 0 0 0 5px var(--mar-navy), 0 0 0 6px var(--mar-gold-line), 0 10px 24px rgba(0,0,0,.5);
}
.hero-marine__img-seal span { font-family: 'Fraunces', serif; font-weight: 600; font-size: .78rem; letter-spacing: .04em; line-height: 1.3; }
.hero-marine__img-seal small { font-size: .56rem; letter-spacing: .08em; color: var(--mar-gold); text-transform: uppercase; margin-top: 3px; }

.hero-marine__badge {
    display: inline-flex; align-items: center; gap: 9px; background: rgba(244,233,216,.06);
    border: 1px solid var(--mar-gold-line); color: var(--mar-gold); padding: 7px 18px;
    border-radius: 2px; font-size: .78rem; letter-spacing: .06em; margin-bottom: 26px;
    animation: mar-slideUp .8s ease-out .1s both;
}
.hero-marine__badge svg { width: 15px; height: 15px; color: var(--mar-gold); }

.hero-marine__title {
    font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(2.1rem, 4vw, 3.2rem);
    line-height: 1.14; letter-spacing: -.01em; color: var(--mar-ivory);
    animation: mar-slideUp .8s ease-out .25s both;
}
.title-marine-sub {
    display: block; font-family: 'Fraunces', serif; font-style: italic; font-weight: 400;
    font-size: .36em; color: var(--mar-gold); margin-top: 12px; letter-spacing: .02em;
}
.hero-marine__rule { width: 56px; height: 1px; background: var(--mar-gold-line); margin: 26px 0; animation: mar-slideUp .8s ease-out .4s both; }
.hero-marine__sub {
    font-size: 1.01rem; color: var(--mar-ivory-soft); margin: 0 0 36px; line-height: 1.75;
    max-width: 42ch; animation: mar-slideUp .8s ease-out .45s both;
}
@keyframes mar-slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.hero-marine__ctas { display: flex; gap: 16px; flex-wrap: wrap; animation: mar-slideUp .8s ease-out .6s both; }
.btn-marine-main {
    background: var(--mar-gold); color: var(--mar-navy); text-decoration: none; padding: 14px 32px;
    border-radius: 2px; font-weight: 600; font-size: .94rem; letter-spacing: .02em;
    transition: all .3s; display: inline-block;
}
.btn-marine-main:hover { background: #D6B679; transform: translateY(-2px); color: var(--mar-navy); }
.btn-marine-ghost {
    background: transparent; color: var(--mar-ivory); border: 1px solid rgba(244,233,216,.35);
    text-decoration: none; padding: 13px 30px; border-radius: 2px; font-weight: 500;
    font-size: .94rem; letter-spacing: .02em; transition: all .3s; display: inline-block;
}
.btn-marine-ghost:hover { border-color: var(--mar-gold); color: var(--mar-gold); transform: translateY(-2px); }

@media (max-width: 960px) {
    .hero-marine__visual { display: none; }
    .hero-marine__prop--poulpe { width: 50vw; right: -10%; bottom: -10%; opacity: .5; }
    .hero-marine__prop--hippocampe { display: none; }
    .hero-marine__inner { padding: 130px 32px; }
    .hero-marine__sub { max-width: 100%; }
}

/* ────────────────────────────────────────
   RUBAN — bouclage exact (2 blocs identiques, marge sur chaque bloc)
──────────────────────────────────────── */
.ruban-marine { background: var(--mar-navy); overflow: hidden; padding: 15px 0; border-top: 1px solid var(--mar-gold-line); border-bottom: 1px solid var(--mar-gold-line); }
.ruban-marine__track { display: flex; width: max-content; animation: mar-ruban-defile 34s linear infinite; }
.ruban-marine__set { display: flex; align-items: center; flex-shrink: 0; margin-right: 56px; }
.ruban-marine__set span {
    display: inline-flex; align-items: center; gap: 14px; margin-right: 40px;
    font-family: 'Fraunces', serif; font-style: italic; font-weight: 400; font-size: .92rem;
    color: var(--mar-ivory-soft); letter-spacing: .02em; white-space: nowrap;
}
.ruban-marine__set span::after { content: "◆"; font-size: .5rem; color: var(--mar-gold); opacity: .7; margin-left: 14px; }
@keyframes mar-ruban-defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ruban-marine__track { animation: none; } }

/* ────────────────────────────────────────
   SECTION "COMMENT ÇA MARCHE"
──────────────────────────────────────── */
.section-how-marine { padding: 76px 24px; }
.section-tag-marine {
    display: flex; align-items: center; gap: 8px; font-family: 'Fraunces', serif; font-style: italic;
    font-weight: 500; font-size: 1.02rem; color: var(--mar-primary); margin-bottom: 10px;
}
.section-tag-marine::before { content: "◆"; font-style: normal; font-size: .6rem; color: var(--mar-gold-d); }
.section-title-marine {
    font-family: 'Fraunces', serif; font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.3rem);
    color: var(--mar-ink); margin: 0 0 40px;
}
.how-grid-marine { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.how-card-marine {
    position: relative; background: var(--mar-card); border: 1px solid var(--mar-border); border-radius: 8px;
    padding: 26px 22px; opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease;
}
.how-card-marine.revealed { opacity: 1; transform: translateY(0); }
.how-card-marine__num { position: absolute; top: 18px; right: 20px; font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.6rem; color: rgba(27,75,102,.12); }
.how-card-marine__icon { display: inline-flex; font-size: 1.5rem; margin-bottom: 14px; }
.how-card-marine h3 { font-family: 'Fraunces', serif; font-size: 1.08rem; margin: 0 0 8px; padding-right: 36px; color: var(--mar-ink); }
.how-card-marine p { font-size: .92rem; line-height: 1.55; color: var(--mar-ink-soft); margin: 0; }

/* ────────────────────────────────────────
   CONFIGURATEUR — override des composants génériques
──────────────────────────────────────── */
.marine-page .section-perso { background: transparent; }
.marine-page .section-title-marine { text-align: left; }
.marine-img-box { border-radius: 8px; overflow: hidden; border: 1px solid var(--mar-border); box-shadow: 0 12px 32px rgba(15,31,48,.1); }

.selector-block { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.selector-block.revealed { opacity: 1; transform: translateY(0); }
.marine-page .selector-label { font-family: 'Fraunces', serif; font-weight: 600; color: var(--mar-ink); }
.selector-opt-label { font-weight: 400; font-size: .8em; color: var(--mar-ink-soft); }
.marine-page .required { color: var(--mar-primary); }

.marine-page .fabric-card {
    background: var(--mar-card); border: 2px solid transparent; border-radius: 8px;
    padding: 12px; text-align: center; cursor: pointer; transition: all .3s; position: relative;
}
.marine-page .fabric-card:hover { border-color: var(--mar-border-h); transform: translateY(-2px); }
.marine-page .fabric-card.selected { border-color: var(--mar-primary); background: var(--mar-tint); }
.marine-page .fabric-img { background: var(--mar-bg-2); }
.marine-page .fabric-name { color: var(--mar-ink); }
.marine-page .fabric-price { color: var(--mar-primary); }
.marine-page .fabric-material { color: rgba(15,31,48,.72); }
.marine-page .fabric-card .fabric-check { background: var(--mar-primary); color: #fff; }

.marine-page .size-option, .marine-page .color-option {
    background: var(--mar-card); border: 2px solid var(--mar-border); border-radius: 8px; transition: all .3s;
}
.marine-page .size-option:hover, .marine-page .color-option:hover { border-color: var(--mar-border-h); }
.marine-page .size-option.selected, .marine-page .color-option.selected { border-color: var(--mar-primary); background: var(--mar-tint); }
.marine-page .size-option span, .marine-page .color-option span { color: var(--mar-ink); }

.marine-shipping-info {
    display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; padding: 16px 18px;
    background: var(--mar-card); border: 1px solid var(--mar-border); border-radius: 8px;
}
.marine-shipping-item { font-size: .84rem; color: var(--mar-ink-soft); line-height: 1.6; }
.marine-shipping-item strong { color: var(--mar-ink); }

.marine-page .cart-section {
    background: var(--mar-card) !important; border: 1px solid var(--mar-border) !important; border-radius: 8px !important;
    box-shadow: 0 14px 36px rgba(15,31,48,.12) !important;
}
.marine-page .price-value { color: var(--mar-primary) !important; font-family: 'Fraunces', serif !important; }
.marine-page .price-currency { color: var(--mar-gold-d) !important; }
.marine-page .qty-selector { background: var(--mar-bg-2) !important; }
.marine-page .qty-btn { color: var(--mar-primary) !important; }
.marine-page #qte { color: var(--mar-ink) !important; }
.marine-page .btn-cart { background: var(--mar-primary) !important; border-radius: 4px !important; box-shadow: 0 8px 20px -6px rgba(27,75,102,.5) !important; }
.marine-page .btn-cart:hover { background: var(--mar-primary-h) !important; }

.back-section { text-align: center; padding: 44px 32px; background: var(--mar-bg); border-top: 1px solid var(--mar-border); }
.marine-page .btn-back {
    display: inline-block; padding: 11px 28px; background: transparent; color: var(--mar-ink-soft);
    border: 1px solid var(--mar-border); border-radius: 2px; font-size: 13px; text-decoration: none;
    transition: color .2s, border-color .2s;
}
.marine-page .btn-back:hover { color: var(--mar-primary); border-color: var(--mar-border-h); text-decoration: none; }

/* ────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────── */
@media (max-width: 1100px) {
    .marine-page .perso-flex-container { flex-direction: column; gap: 40px; }
    .marine-page .perso-left-visual { position: sticky; top: 80px; z-index: 10; width: 100%; max-width: 100%; padding-bottom: 15px; }
    .marine-page .perso-right-selectors { width: 100%; }
    .section-perso { padding: 60px 20px; }
    .marine-page .image-thumbnails { display: none; }
}
@media (max-width: 768px) {
    .hero-marine__inner { padding: 110px 20px 70px; flex-direction: column; gap: 8px; align-items: flex-start; }
    .hero-marine__title { font-size: clamp(2rem, 7vw, 2.6rem); }
    .hero-marine__sub { font-size: .92rem; margin: 0 0 22px; }
    .hero-marine__ctas { flex-direction: column; gap: 10px; width: 100%; }
    .hero-marine .btn-marine-main, .hero-marine .btn-marine-ghost { display: block; width: 100%; text-align: center; }
    .marine-page .size-options { flex-direction: column; }
    .marine-page .size-option { flex: none; width: 100%; }
    .how-grid-marine { gap: 16px; }

    /* le texte s'empile en colonne et occupe la quasi-totalité du haut du hero :
       on redescend les poissons dans la bande d'eau libre juste au-dessus du récif,
       et on réduit leur nombre pour rester sobre sur petit écran */
    .poisson-slot-1, .poisson-slot-3 { display: none; }
    .poisson-slot-0 { top: 80% !important; }
    .poisson-slot-2 { top: 88% !important; }
    .poisson-slot-4 { top: 84% !important; }
}
@media (max-width: 480px) {
    .marine-page .cart-section { flex-direction: column !important; padding: 24px 20px !important; gap: 20px !important; }
    .section-perso { padding: 48px 16px; }
    .section-title-marine { font-size: clamp(18px, 5vw, 26px); margin-bottom: 28px; }
    .how-card-marine { width: 100%; max-width: 100%; padding: 26px 18px 20px; }
    .section-how-marine { padding: 48px 16px; }
    .back-section { padding: 32px 20px; }
}
