/* =========================================================
   Notre Mariage — feuille de style principale
   Palette : bleu #00A3E0 / vert #73C92D / gris #91999F
   Police : Trebuchet MS (exclusive)
   ========================================================= */

:root {
    --blue: #00A3E0;
    --blue-dark: #0089BD;
    --blue-tint: #E4F6FC;
    --green: #73C92D;
    --green-dark: #5CA824;
    --green-tint: #EEF9E4;
    --gray: #91999F;
    --gray-light: #F5F7F8;
    --gray-border: #E3E7E9;
    --ink: #2C3438;
    --white: #FFFFFF;

    --font: 'Trebuchet MS', 'Trebuchet', Verdana, sans-serif;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(44, 52, 56, 0.08);
    --shadow-lift: 0 10px 30px rgba(44, 52, 56, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--gray-light);
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- HERO ---------- */

.hero {
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 163, 224, 0.16), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(115, 201, 45, 0.14), transparent 45%),
        var(--white);
    position: relative;
}

.hero-inner { max-width: 640px; }

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 13px;
    font-weight: bold;
    color: var(--blue);
    margin: 0 0 18px;
}

.hero-title {
    font-size: clamp(38px, 7vw, 64px);
    margin: 0 0 10px;
    font-weight: bold;
    line-height: 1.1;
    color: var(--ink);
}

.hero-date {
    font-size: 19px;
    color: var(--gray);
    margin: 0 0 28px;
    text-transform: capitalize;
}

.hero-countdown {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    padding: 18px 34px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.countdown-number {
    font-size: 40px;
    font-weight: bold;
    color: var(--blue);
    line-height: 1;
}

.countdown-label {
    font-size: 13px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-today {
    font-size: 20px;
    color: var(--green-dark);
    text-transform: none;
    letter-spacing: 0;
}

.hero-intro {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gray);
    font-size: 20px;
    animation: bounce 2.2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* ---------- TIMELINE STRUCTURE ---------- */

.timeline-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px 100px;
}

.phase-section { margin-bottom: 64px; }

.phase-heading {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 40px;
}

.phase-heading h2 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gray);
    white-space: nowrap;
    margin: 0;
}

.phase-heading-line {
    flex: 1;
    height: 1px;
    background: var(--gray-border);
}

.phase-avant .phase-heading h2 { color: var(--blue-dark); }
.phase-pendant .phase-heading h2 { color: var(--green-dark); }
.phase-apres .phase-heading h2 { color: var(--gray); }

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gray-border), var(--gray-border));
}

.phase-avant .timeline::before { background: linear-gradient(to bottom, var(--blue-tint), var(--blue)); }
.phase-pendant .timeline::before { background: linear-gradient(to bottom, var(--green), var(--green-tint)); }
.phase-apres .timeline::before { background: var(--gray-border); }

.timeline-item {
    position: relative;
    margin-bottom: 28px;
    animation: fade-up 0.6s ease both;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-size: 13px;
    box-shadow: var(--shadow);
}

.phase-pendant .timeline-dot { border-color: var(--green); color: var(--green-dark); }
.phase-apres .timeline-dot { border-color: var(--gray); color: var(--gray); }

/* ---------- CARDS ---------- */

.card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--blue);
}

.phase-pendant .card { border-left-color: var(--green); }
.phase-apres .card { border-left-color: var(--gray); }

.card-date {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray);
    margin-bottom: 6px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--ink);
}

.card-text {
    margin: 0 0 4px;
    line-height: 1.6;
    color: var(--ink);
}

/* ---------- GALLERY ---------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.gallery-thumb {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--gray-light);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumb:hover img { transform: scale(1.06); }

.guest-gallery-label {
    margin: 16px 0 4px;
    font-size: 13px;
    color: var(--green-dark);
    font-weight: bold;
}

/* ---------- CARTE PLANNING JOUR J (élément signature) ---------- */

.card-planning {
    border-left: none;
    border: 2px dashed var(--green);
    background:
        radial-gradient(circle at 0 50%, var(--gray-light) 6px, transparent 7px) left / 100% 24px repeat-y,
        var(--white);
    position: relative;
    padding: 28px 26px;
}

.planning-title {
    margin: 0 0 4px;
    font-size: 22px;
    color: var(--green-dark);
}

.planning-intro {
    color: var(--gray);
    margin: 0 0 18px;
    font-size: 14px;
}

.planning-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.planning-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px dashed var(--gray-border);
}

.planning-item:first-child { border-top: none; }

.planning-time {
    flex-shrink: 0;
    width: 62px;
    font-weight: bold;
    color: var(--green-dark);
    font-size: 16px;
}

.planning-content strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.planning-location {
    font-size: 12px;
    color: var(--gray);
}

.planning-content p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--ink);
    line-height: 1.5;
}

/* ---------- EMPTY STATE ---------- */

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray);
}

.empty-state i { font-size: 40px; margin-bottom: 14px; display: block; }

/* ---------- FOOTER ---------- */

.site-footer {
    text-align: center;
    padding: 30px;
    color: var(--gray);
    font-size: 14px;
}

.site-footer i { color: var(--green); }

/* ---------- BUTTONS ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 11px 22px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }

.btn-secondary { background: var(--green); color: var(--white); }
.btn-secondary:hover { background: var(--green-dark); }

.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--gray-border); }
.btn-ghost:hover { background: var(--gray-light); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- MODAL (partagé invités / admin) ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 52, 56, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal-overlay.open { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lift);
    animation: modal-pop 0.2s ease both;
}

@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-border);
}

.modal-header h3 { margin: 0; font-size: 18px; }

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
}

.modal-body { padding: 22px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 14px;
}

.field-group { margin-bottom: 16px; }

.field-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--ink);
}

.field-group input[type="text"],
.field-group input[type="date"],
.field-group input[type="datetime-local"],
.field-group input[type="password"],
.field-group input[type="file"],
.field-group select,
.field-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    background: var(--white);
}

.field-group textarea { resize: vertical; }

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.field-hint {
    font-size: 12px;
    color: var(--gray);
    margin: 6px 0 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: normal;
    margin-top: 10px;
    cursor: pointer;
}

.checkbox-label input { width: auto; }

.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 14px;
}

.alert-error { background: #FCE8E8; color: #B23A3A; border: 1px solid #F3C8C8; }
.alert-success { background: var(--green-tint); color: var(--green-dark); border: 1px solid var(--green); }

/* ---------- LIGHTBOX ---------- */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 26, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 30px;
}

.lightbox-overlay.open { display: flex; }

.lightbox-overlay img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
}

/* ---------- TOAST ---------- */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--ink);
    color: var(--white);
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1200;
    box-shadow: var(--shadow-lift);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error { background: #B23A3A; }

/* ---------- NAVIGATION INVITÉ ---------- */

.guest-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    position: sticky;
    top: 0;
    z-index: 80;
    flex-wrap: wrap;
    gap: 10px;
}

.guest-nav-brand {
    font-weight: bold;
    color: var(--blue-dark);
    font-size: 15px;
}

.guest-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.guest-nav-name {
    font-size: 13px;
    color: var(--gray);
}

/* ---------- PROFIL INVITÉ ---------- */

.profile-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    padding: 40px 36px;
    width: 100%;
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
}

.profile-card h1 { font-size: 22px; margin: 8px 0 4px; }
.profile-card form { text-align: left; margin-top: 20px; }

.member-row {
    display: grid;
    grid-template-columns: 1fr 1fr 110px 36px;
    gap: 8px;
    margin-bottom: 8px;
}

.member-row input,
.member-row select {
    padding: 9px 10px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
}

@media (max-width: 520px) {
    .member-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- AUTEUR DE PUBLICATION (invité) ---------- */

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.post-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--blue-tint);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 14px;
}

.post-author-avatar img { width: 100%; height: 100%; object-fit: cover; }

.post-author-name {
    display: block;
    font-weight: bold;
    font-size: 14px;
    color: var(--ink);
}

.card-guest-post { border-left-color: var(--green); }

/* ---------- RÉACTIONS ---------- */

.reaction-bar {
    display: flex;
    gap: 6px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-border);
}

.reaction-btn {
    background: var(--gray-light);
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}

.reaction-btn:hover { background: var(--blue-tint); }
.reaction-btn.active { background: var(--blue-tint); border-color: var(--blue); }

.reaction-count {
    font-size: 11px;
    font-weight: bold;
    color: var(--gray);
}

/* ---------- COMMENTAIRES ---------- */

.comments-block { margin-top: 10px; }

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.comment-item {
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    position: relative;
    padding-right: 30px;
}

.comment-author {
    font-weight: bold;
    margin-right: 6px;
    color: var(--blue-dark);
}

.comment-delete {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 11px;
}

.comment-form {
    display: flex;
    gap: 8px;
}

.comment-form input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--gray-border);
    border-radius: 999px;
    font-family: var(--font);
    font-size: 13px;
}

.comment-form button {
    background: var(--blue);
    color: var(--white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

.comment-form button:hover { background: var(--blue-dark); }

/* ---------- PAGE MENU (invité) ---------- */

.menu-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 30px 20px 80px;
}

.menu-page-intro { text-align: center; margin-bottom: 28px; }
.menu-page-intro h1 { font-size: 24px; margin: 0 0 8px; }

.menu-member-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.menu-member-card[data-member-type="enfant"] { border-left-color: var(--green); }

.menu-member-card h2 {
    font-size: 18px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 600px) {
    .timeline-wrap { padding: 40px 14px 80px; }
    .timeline { padding-left: 34px; }
    .timeline-dot { left: -34px; width: 28px; height: 28px; }
    .card { padding: 18px; }
}
