* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rose: #D2648E;
    --rose-dark: #A83E6A;
    --gold: #C99A3E;
    --gold-light: #EBD3A0;
    --plum: #7A2E55;
    --blush: #FFF6F8;
    --cream-card: #FFFCFD;
    --ink: #4A2A38;
    --ink-soft: #86697A;
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(201, 154, 62, 0.12), transparent 40%),
        radial-gradient(circle at 90% 25%, rgba(210, 100, 142, 0.12), transparent 45%),
        var(--blush);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--ink);
    position: relative;
    overflow-x: hidden;
}

/* Confettis flottants */
.floaties {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floaties span {
    position: absolute;
    top: -10%;
    font-size: 1.8em;
    opacity: 0.55;
    animation: floatDown 14s linear infinite;
}

@keyframes floatDown {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.55; }
    90% { opacity: 0.55; }
    100% { transform: translateY(110vh) rotate(200deg); opacity: 0; }
}

/* Portrait de Marylou dans le cadre de ballons */
.hero-frame {
    position: relative;
    width: min(420px, 100%);
    margin: 10px auto 0;
    aspect-ratio: 1 / 1;
    z-index: 10;
}

.hero-portrait {
    position: absolute;
    /* Centre du cercle de paillettes dans l'image de ballons */
    left: 57.5%;
    top: 49.5%;
    width: 54%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 46%;
}

.hero-balloons {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    margin: 0 0 14px;
}

.hero-kicker {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    /* Aussi gros que possible sans passer sur deux lignes sur mobile */
    font-size: clamp(1.2rem, 6vw, 1.9rem);
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
    color: var(--gold);
}

.hero-name {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    font-size: 1.9em;
    color: var(--rose-dark);
    margin-top: 2px;
}

.container {
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--ink-soft);
    text-decoration: none;
}

.back-link:hover {
    color: var(--rose);
}

.eyebrow {
    display: inline-block;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--plum);
    margin-bottom: 6px;
}

header h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.2em;
    line-height: 1.25;
    margin-bottom: 12px;
    color: var(--ink);
    font-weight: 700;
}

header h1 .highlight {
    color: var(--rose);
    position: relative;
}

.subtitle {
    font-size: 1em;
    color: var(--ink-soft);
    line-height: 1.5;
    max-width: 420px;
    margin: 0 auto;
}

/* Gros bouton photo (CTA principal) */
.cta-container {
    margin-bottom: 36px;
}

.cta-photo-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
}

.cta-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: linear-gradient(180deg, #F4F4F4 0%, #DCDCDC 100%);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.8),
        inset 0 -3px 5px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(74, 42, 56, 0.15);
    transition: transform 0.15s, box-shadow 0.2s;
}

.cta-photo-btn:hover .cta-circle {
    transform: translateY(-2px);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.8),
        inset 0 -3px 5px rgba(0, 0, 0, 0.08),
        0 10px 24px rgba(74, 42, 56, 0.2);
}

.cta-photo-btn:active .cta-circle {
    transform: scale(0.96);
}

.cta-camera-icon {
    width: 42px;
    height: 42px;
    color: #6B6B6B;
}

.cta-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--ink);
}

.cta-sub {
    font-size: 0.88em;
    color: var(--ink-soft);
}

.wall-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1em;
    color: var(--rose-dark);
    text-decoration: none;
    padding: 10px;
}

.wall-link:hover {
    text-decoration: underline;
}

/* Aperçu de la photo dans la modale de détails */
.details-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.details-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(74, 42, 56, 0.15);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--ink-soft);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #F2D9E2;
    border-radius: 14px;
    font-size: 1em;
    font-family: inherit;
    color: var(--ink);
    background: #FFFAFB;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
    color: #C4A9B6;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(210, 100, 142, 0.12);
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--rose) 0%, var(--gold) 100%);
    color: white;
    border: none;
    border-radius: 999px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(168, 62, 106, 0.3);
    transition: all 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(168, 62, 106, 0.4);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Mur de photos (photoboard) */
.photoboard {
    margin-top: 8px;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.download-hint {
    text-align: center;
    font-size: 0.78em;
    color: var(--ink-soft);
    margin-top: -2px;
}

.download-all-btn {
    display: block;
    width: 100%;
    padding: 13px;
    border: 1.5px solid #F2D9E2;
    border-radius: 14px;
    background: #FFFAFB;
    color: var(--ink);
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.98em;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.download-all-btn:hover {
    border-color: var(--gold);
    background: rgba(201, 154, 62, 0.06);
}

.download-all-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.no-messages {
    text-align: center;
    color: var(--ink-soft);
    padding: 30px 20px;
    font-style: italic;
    grid-column: 1 / -1;
}

.photoboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.photo-card {
    background: white;
    border-radius: 14px;
    padding: 10px 10px 12px;
    box-shadow: 0 6px 16px rgba(74, 42, 56, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:nth-child(3n+1) { transform: rotate(-2deg); }
.photo-card:nth-child(3n+2) { transform: rotate(1.5deg); }
.photo-card:nth-child(3n+3) { transform: rotate(-1deg); }

.photo-card:hover {
    transform: rotate(0deg) translateY(-3px);
    box-shadow: 0 10px 22px rgba(74, 42, 56, 0.18);
    z-index: 2;
}

.photo-card-media {
    position: relative;
}

.photo-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.photo-download-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    font-size: 0.85em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
}

.photo-download-btn:hover {
    background: white;
    transform: scale(1.08);
}

.photo-card-name {
    display: block;
    margin-top: 8px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    color: var(--rose-dark);
    text-align: center;
}

.photo-card-text {
    font-size: 0.82em;
    color: var(--ink-soft);
    text-align: center;
    margin-top: 3px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.photo-card.note-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: var(--cream-card);
    border: 1.5px dashed var(--gold-light);
}

.photo-card.note-card .photo-card-quote {
    font-size: 1.6em;
    color: var(--gold);
    margin-bottom: 4px;
}

/* Lightbox (agrandissement d'une photo du mur) */
.lightbox {
    position: fixed;
    z-index: 999998;
    inset: 0;
    background-color: rgba(40, 20, 30, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    animation: fadeIn 0.2s ease-out;
    cursor: zoom-out;
}

.lightbox.hidden {
    display: none;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Modal Styles */
.success-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(74, 42, 56, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.success-modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-modal-content {
    background-color: var(--cream-card);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 16px 50px rgba(74, 42, 56, 0.3);
    z-index: 1000000;
    border: 3px solid var(--gold-light);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-modal-close {
    position: absolute;
    right: 20px;
    top: 16px;
    font-size: 28px;
    font-weight: bold;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 0.3s;
}

.success-modal-close:hover {
    color: var(--rose);
}

.success-modal-content h2 {
    font-family: 'Fredoka', sans-serif;
    color: var(--ink);
    margin-bottom: 15px;
    text-align: center;
}

.success-modal-content p {
    text-align: center;
    color: var(--ink-soft);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 999px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.social-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.social-btn.facebook {
    background: #1877F2;
}

.social-btn.instagram {
    background: #E4405F;
}

.social-btn.tiktok {
    background: #000000;
}

.social-btn.linkedin {
    background: #0077B5;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .hero-frame {
        width: min(340px, 100%);
    }

    .success-modal-content {
        width: 95%;
        padding: 30px;
    }
}

/* Compact sur mobile */
@media (max-width: 480px) {
    .cta-container {
        margin-bottom: 26px;
    }

    .cta-circle {
        width: 88px;
        height: 88px;
    }

    .cta-camera-icon {
        width: 36px;
        height: 36px;
    }

    .cta-text {
        font-size: 1.05em;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        margin-bottom: 4px;
        font-size: 0.85em;
    }

    .form-group input[type="text"] {
        padding: 9px 12px;
    }

    .form-group textarea {
        min-height: 70px;
        padding: 9px 12px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 0.95em;
    }
}
