/* ---------------------------------------------------------
   BLOOM HEART — STYLE GLOBAL
   Palette : Lavande, Beige, Crème, Taupe
   Style : Instagram + Bloom Heart
--------------------------------------------------------- */

:root {
    --lavande: #9b8ad6;
    --beige: #d9c2a3;
    --creme: #f7f2ea;
    --taupe: #8a7461;
    --text: #3b2f2a;
    --white: #ffffff;

    --radius: 18px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ---------------------------------------------------------
   RESET
--------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--creme);
    font-family: "Poppins", sans-serif;
    color: var(--text);
    padding-bottom: 70px; /* espace pour la bottom bar */
}

/* ---------------------------------------------------------
   HEADER
--------------------------------------------------------- */

.bh-header {
    background: var(--creme);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.bh-logo {
    font-family: "Playfair Display", serif;
    font-size: 1.6rem;
    color: var(--lavande);
}

.bh-logo strong {
    color: var(--beige);
}

/* ---------------------------------------------------------
   MAIN CONTENT
--------------------------------------------------------- */

.bh-main {
    padding: 1.2rem;
}

/* ---------------------------------------------------------
   TITRES DE PAGE
--------------------------------------------------------- */

.page-title {
    font-family: "Playfair Display", serif;
    font-size: 1.8rem;
    color: var(--lavande);
    margin-bottom: 1rem;
    text-align: center;
}

/* ---------------------------------------------------------
   HOME — HERO
--------------------------------------------------------- */

.home-hero {
    text-align: center;
    padding-top: 1rem;
}

.hero-title {
    font-family: "Playfair Display", serif;
    font-size: 2.4rem;
    color: var(--lavande);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--taupe);
    margin-bottom: 1.5rem;
}

.hero-card {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.hero-message {
    font-size: 1rem;
    color: var(--text);
}

/* ---------------------------------------------------------
   HOME — GRID BOUTONS
--------------------------------------------------------- */

.home-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.home-btn {
    display: block;
    padding: 0.9rem;
    background: var(--lavande);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: 0.2s;
}

.home-btn:hover {
    opacity: 0.9;
}

.home-btn-outline {
    background: transparent;
    border: 2px solid var(--lavande);
    color: var(--lavande);
}

/* ---------------------------------------------------------
   LOGIN
--------------------------------------------------------- */

.login-container {
    max-width: 380px;
    margin: auto;
    padding-top: 2rem;
}

.login-title {
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    text-align: center;
    color: var(--lavande);
    margin-bottom: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.login-form input {
    padding: 0.8rem;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 1rem;
}

.error-msg {
    background: #ffdddd;
    color: #a33;
    padding: 0.7rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    text-align: center;
}

/* ---------------------------------------------------------
   BOUTONS
--------------------------------------------------------- */

.btn-primary {
    background: var(--lavande);
    color: var(--white);
    padding: 0.9rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    opacity: 0.9;
}

/* ---------------------------------------------------------
   JOURNAL — FORMULAIRE
--------------------------------------------------------- */

.journal-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.journal-form textarea {
    min-height: 120px;
    padding: 0.8rem;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 1rem;
}

/* ---------------------------------------------------------
   JOURNAL — FEED
--------------------------------------------------------- */

.journal-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.journal-card {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: visible; /* important */
    position: relative; /* nécessaire pour le menu */    
}

.journal-text {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.journal-photo {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.journal-date {
    font-size: 0.8rem;
    color: var(--taupe);
}

/* ---------------------------------------------------------
   PLACEHOLDER PAGES
--------------------------------------------------------- */

.placeholder-text {
    text-align: center;
    color: var(--taupe);
    margin-top: 2rem;
    font-size: 1rem;
}

/* ---------------------------------------------------------
   BOTTOM NAV — STYLE INSTAGRAM
--------------------------------------------------------- */

.bh-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.6rem 0;
    z-index: 20;
}

.nav-item {
    font-size: 1.4rem;
    text-decoration: none;
    color: var(--taupe);
    transition: 0.2s;
}

.nav-item:hover {
    color: var(--lavande);
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (min-width: 600px) {
    .bh-main {
        max-width: 500px;
        margin: auto;
    }
}

.calendar-container {
    margin: 20px auto;
    max-width: 700px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day {
    background: #f9f5f7;
    border-radius: 8px;
    padding: 10px;
    min-height: 80px;
    position: relative;
}

.day .number {
    font-weight: bold;
    color: #b48bb4;
}

.event {
    margin-top: 6px;
    font-size: 0.85rem;
    padding: 4px 6px;
    border-radius: 6px;
    background: #e8d7ea;
    color: #5a3d5a;
}

/* Header global */
.bh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    background: white;
    border-bottom: 1px solid rgba(199, 164, 216, 0.25);
    box-shadow: 0 4px 12px rgba(199, 164, 216, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Logo */
.bh-logo {
    font-size: 1.4rem;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    color: var(--bloom-lavender);
}

/* Menu à droite */
.bh-header-menu {
    display: flex;
    gap: 18px;
}

/* Liens */
.bh-header-link {
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    color: var(--bloom-text-main);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--bloom-transition);
}

.bh-header-link:hover {
    background: rgba(199, 164, 216, 0.15);
}

/* Logout rouge doux */
.bh-logout {
    color: #d66;
}

.bh-logout:hover {
    background: rgba(255, 150, 150, 0.2);
}

.login-container {
    width: 90%;
    max-width: 380px;
    margin: 40px auto;
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(199, 164, 216, 0.25);
    text-align: center;
}

/* Conteneur du logo */
.login-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Logo responsive */
.login-logo-img {
    width: 100%;
    max-width: 280px; /* même largeur que les champs */
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Champs */
.login-form {
    margin-top: 20px;
    text-align: left;
}

.login-form label {
    font-weight: 500;
    margin-top: 12px;
    display: block;
}

/* Lien créer un compte */
.login-register-link {
    margin-top: 18px;
    font-size: 0.95rem;
}

.login-register-link a {
    color: var(--bloom-lavender);
    font-weight: 600;
    text-decoration: none;
}

.wishlist-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wishlist-item-title {
    font-size: 18px;
    font-weight: 600;
    color: #5a3e85;
    margin-bottom: 6px;
}

.wishlist-meta {
    font-size: 14px;
    color: #7a7a7a;
    margin-bottom: 10px;
}

.wishlist-note {
    background: #f7f0ff;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 10px;
}

.wishlist-link a {
    color: #8a5acb;
    text-decoration: none;
    font-weight: 500;
}

.wishlist-price {
    font-size: 15px;
    color: #444;
    margin-bottom: 8px;
}

.wishlist-surprise {
    background: #fff7d6;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
    color: #8a6d00;
    margin-top: 8px;
}

.delete-btn {
    background: #ffd4d4;
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #7a0033;
    font-size: 14px;
}

.bloom-form .form-group {
    margin-bottom: 18px;
}

.bloom-form input[type="text"],
.bloom-form input[type="url"],
.bloom-form input[type="number"],
.bloom-form textarea,
.bloom-form select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #d8c9e8;
    background: #faf7ff;
    font-size: 15px;
}

.bloom-form textarea {
    resize: vertical;
}

.bloom-type-selector {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.bubble {
    padding: 8px 14px;
    border-radius: 20px;
    display: inline-block;
    font-size: 14px;
    cursor: pointer;
}

.lavender { background: #e8d9ff; }
.beige    { background: #f7e9d7; }
.taupe    { background: #e6e0da; }

.bubble {
    display: inline-block;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Quand un radio est sélectionné → agrandir la bulle */
.bloom-type-option input[type="radio"]:checked + .bubble {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px rgba(212, 122, 140, 0.35);
    border-radius: 12px;
}

.scope-error {
    display:none;
    color:#d47a8c;
    font-size:14px;
    margin-top:6px;
    font-weight:500;
}

.photo-upload-wrapper {
    display:flex;
    flex-direction:column;
    gap:10px;
}

.photo-preview {
    width:100%;
    max-width:260px;
    height:180px;
    border-radius:12px;
    background:#f7f3f5;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    border:1px solid #e6dce0;
}

.preview-img {
    width:100%;
    height:100%;
    object-fit:cover;
}

.preview-placeholder {
    color:#b8a8ad;
    font-size:14px;
}

/* Wrapper */
.photo-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Input caché */
.photo-input-hidden {
    display: none;
}

/* Bouton BloomHeart */
.photo-upload-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e8d9e6, #f4e9f2);
    color: #6a4c5a;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e0c9d8;
    transition: all 0.25s ease;
    text-align: center;
    width: fit-content;
}

.photo-upload-btn:hover {
    background: linear-gradient(135deg, #f7eef6, #f0e2ed);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(180, 140, 160, 0.25);
}

/* Preview */
.photo-preview {
    width: 100%;
    max-width: 260px;
    height: 180px;
    border-radius: 14px;
    background: #faf6f8;
    border: 1px solid #e6dce0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.25s ease;
}

.photo-preview:hover {
    box-shadow: 0 4px 12px rgba(180, 140, 160, 0.25);
}

/* Image */
.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder */
.preview-placeholder {
    color: #b8a8ad;
    font-size: 14px;
    opacity: 0.8;
}

.reaction-bar {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.reaction-btn {
    background: #f7f0fa;
    border: 1px solid #e3d2ec;
    border-radius: 12px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.15s ease, background 0.2s;
}

.reaction-btn:hover {
    transform: scale(1.2);
    background: #f1e4f7;
}

.reaction-totals {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    font-size: 1.1rem;
}

.reaction-total {
    background: #faf5fc;
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid #e6d8f0;
}

/* Wrapper */
.reaction-wrapper {
    position: relative;
    margin-top: 14px;
}

/* Bouton principal */
.reaction-main-btn {
    background: #f7f0fa;
    border: 1px solid #e3d2ec;
    border-radius: 12px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1rem;
    color: #7a4ca0;
    transition: all 0.2s ease;
}

.reaction-main-btn:hover {
    background: #f1e4f7;
    transform: translateY(-2px);
}

/* Menu déroulant */
.reaction-menu {
    position: absolute;
    top: 35px;
    left: 0;
    display: flex;
    gap: 8px;
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(122, 76, 160, 0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(5px);
    transition: all 0.25s ease;
    z-index: 10;
    max-width: 100%;
    overflow-x: auto;    
}

/* Affichage au hover */
.reaction-wrapper:hover .reaction-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Boutons emojis */
.reaction-choice {
    background: #f7f0fa;
    border: 1px solid #e3d2ec;
    border-radius: 12px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: transform 0.15s ease, background 0.2s;
}

.reaction-choice:hover {
    transform: scale(1.25);
    background: #f1e4f7;
}

/* Totaux */
.reaction-totals {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    font-size: 1.1rem;
}

.reaction-total {
    background: #faf5fc;
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid #e6d8f0;
}

.delete-form {
    margin-top: 10px;
}

.delete-btn {
    background: #ffe6e6;
    border: 1px solid #ffb3b3;
    color: #b33a3a;
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #ffcccc;
    transform: translateY(-2px);
}

/* ---------------------------------------------------------
   SOS ÉMOTIONS — PAGE
--------------------------------------------------------- */

.sos-page {
    padding: 1.2rem;
    max-width: 650px;
    margin: auto;
}

/* Sous-titre */
.sos-subtitle,
.sos-subtitle-maman {
    text-align: center;
    color: var(--taupe);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Message succès */
.sos-success {
    background: #e8ffe8;
    border: 1px solid #b6e8b6;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    color: #3a7a3a;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

/* ---------------------------------------------------------
   ÉMOTIONS — GRID
--------------------------------------------------------- */

.emotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.emotion-card {
    cursor: pointer;
}

.emotion-card input {
    display: none;
}

.emotion-inner {
    background: var(--white);
    border: 2px solid #e8d9f0;
    border-radius: var(--radius);
    padding: 1rem 0.6rem;
    text-align: center;
    transition: 0.25s;
    box-shadow: var(--shadow);
}

.emotion-card:hover .emotion-inner {
    transform: scale(1.05);
    border-color: var(--lavande);
}

.emotion-card input:checked + .emotion-inner {
    background: #f7f0fa;
    border-color: var(--lavande);
    box-shadow: 0 6px 16px rgba(155, 138, 214, 0.25);
}

.emotion-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.4rem;
}

.emotion-text {
    color: var(--lavande);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ---------------------------------------------------------
   SOS ÉMOTIONS — PAGE
--------------------------------------------------------- */

.sos-page {
    padding: 1.2rem;
    max-width: 650px;
    margin: auto;
}

.sos-subtitle,
.sos-subtitle-maman {
    text-align: center;
    color: var(--taupe);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.sos-success {
    background: #e8ffe8;
    border: 1px solid #b6e8b6;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    color: #3a7a3a;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

/* Émotions */
.emotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.emotion-card {
    cursor: pointer;
}

.emotion-card input {
    display: none;
}

.emotion-inner {
    background: var(--white);
    border: 2px solid #e8d9f0;
    border-radius: var(--radius);
    padding: 1rem 0.6rem;
    text-align: center;
    transition: 0.25s;
    box-shadow: var(--shadow);
}

.emotion-card:hover .emotion-inner {
    transform: scale(1.05);
    border-color: var(--lavande);
}

.emotion-card input:checked + .emotion-inner {
    background: #f7f0fa;
    border-color: var(--lavande);
    box-shadow: 0 6px 16px rgba(155, 138, 214, 0.25);
}

.emotion-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.4rem;
}

.emotion-text {
    color: var(--lavande);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Textarea */
.sos-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.1);
    background: #faf7ff;
    font-size: 1rem;
    color: var(--text);
    resize: vertical;
    transition: 0.25s;
}

.sos-textarea:focus {
    border-color: var(--lavande);
    box-shadow: 0 0 0 3px rgba(155, 138, 214, 0.25);
    outline: none;
}

/* Notification maman */
.sos-empty {
    text-align: center;
    color: var(--taupe);
    font-size: 1rem;
    margin-top: 1rem;
}

.sos-notif-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
    margin-top: 1rem;
}

.notif-text {
    color: var(--lavande);
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.notif-time {
    color: var(--taupe);
    font-size: 0.85rem;
}

.bh-bottom-nav .nav-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-icon {
    width: 26px;
    height: 26px;
    object-fit: cover;      /* zoom léger */
    object-position: center; /* centre l’objet */
    transform: scale(2.5);  /* zoom interne sans changer la taille du conteneur */
    display: block;
}

.bh-header-menu .bh-header-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon {
    width: 26px;
    height: 26px;
    object-fit: cover;
    object-position: center;
    transform: scale(2.5); /* zoom interne */
    display: block;
}

