# Generated by Django 5.0.2 on 2024-02-26 16:41

import uuid

import django.core.validators
import django.db.models.deletion
import django.utils.timezone
import modelcluster.contrib.taggit
import modelcluster.fields
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields
import wagtail.images.blocks
import wagtail.search.index
import wagtailmarkdown.blocks
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("taggit", "0006_rename_taggeditem_content_type_object_id_taggit_tagg_content_8fc721_idx"),
        ("wagtailcore", "0091_remove_revision_submitted_for_moderation"),
        ("wagtailimages", "0025_alter_image_file_alter_rendition_file"),
    ]

    operations = [
        migrations.CreateModel(
            name="Tag",
            fields=[],
            options={
                "proxy": True,
                "indexes": [],
                "constraints": [],
            },
            bases=("taggit.tag",),
        ),
        migrations.CreateModel(
            name="BlogEntryPage",
            fields=[
                (
                    "page_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="wagtailcore.page",
                    ),
                ),
                (
                    "body",
                    wagtail.fields.StreamField(
                        [
                            ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")),
                            ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")),
                            (
                                "image",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre", required=False)),
                                        ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")),
                                        (
                                            "alt",
                                            wagtail.blocks.CharBlock(
                                                label="Texte alternatif (description textuelle de l’image)",
                                                required=False,
                                            ),
                                        ),
                                        ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)),
                                        ("url", wagtail.blocks.URLBlock(label="Lien", required=False)),
                                    ]
                                ),
                            ),
                            (
                                "imageandtext",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")),
                                        (
                                            "image_side",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[("left", "Gauche"), ("right", "Droite")],
                                                label="Côté où afficher l’image",
                                            ),
                                        ),
                                        (
                                            "image_ratio",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")],
                                                label="Largeur de l’image",
                                            ),
                                        ),
                                        ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")),
                                        (
                                            "link_label",
                                            wagtail.blocks.CharBlock(
                                                help_text="Le lien apparait en bas du bloc de droite, avec une flèche",
                                                label="Titre du lien",
                                                required=False,
                                            ),
                                        ),
                                        (
                                            "page",
                                            wagtail.blocks.PageChooserBlock(label="Lien interne", required=False),
                                        ),
                                        ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)),
                                    ],
                                    label="Bloc image et texte",
                                ),
                            ),
                            (
                                "alert",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)),
                                        (
                                            "description",
                                            wagtail.blocks.TextBlock(label="Texte du message", required=False),
                                        ),
                                        (
                                            "level",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[
                                                    ("error", "Erreur"),
                                                    ("success", "Succès"),
                                                    ("info", "Information"),
                                                    ("warning", "Attention"),
                                                ],
                                                label="Type de message",
                                            ),
                                        ),
                                        (
                                            "heading_tag",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[
                                                    ("h2", "En-tête 2"),
                                                    ("h3", "En-tête 3"),
                                                    ("h4", "En-tête 4"),
                                                    ("h5", "En-tête 5"),
                                                    ("h6", "En-tête 6"),
                                                    ("p", "Paragraphe"),
                                                ],
                                                help_text="À adapter à la structure de la page. Par défaut en-tête 3.",
                                                label="Niveau de titre",
                                            ),
                                        ),
                                    ],
                                    label="Message d’alerte",
                                ),
                            ),
                            (
                                "callout",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False),
                                        ),
                                        ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)),
                                        (
                                            "heading_tag",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[
                                                    ("h2", "En-tête 2"),
                                                    ("h3", "En-tête 3"),
                                                    ("h4", "En-tête 4"),
                                                    ("h5", "En-tête 5"),
                                                    ("h6", "En-tête 6"),
                                                    ("p", "Paragraphe"),
                                                ],
                                                help_text="À adapter à la structure de la page. Par défaut en-tête 3.",
                                                label="Niveau de titre",
                                            ),
                                        ),
                                    ],
                                    label="Texte mise en avant",
                                ),
                            ),
                            (
                                "quote",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "image",
                                            wagtail.images.blocks.ImageChooserBlock(
                                                label="Illustration (à gauche)", required=False
                                            ),
                                        ),
                                        ("quote", wagtail.blocks.CharBlock(label="Citation")),
                                        ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")),
                                        ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")),
                                    ],
                                    label="Citation",
                                ),
                            ),
                            (
                                "video",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre", required=False)),
                                        ("caption", wagtail.blocks.CharBlock(label="Légende")),
                                        (
                                            "url",
                                            wagtail.blocks.URLBlock(
                                                help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)",
                                                label="Lien de la vidéo",
                                            ),
                                        ),
                                    ],
                                    label="Vidéo",
                                ),
                            ),
                            (
                                "multicolumns",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "bg_image",
                                            wagtail.images.blocks.ImageChooserBlock(
                                                label="Image d’arrière plan", required=False
                                            ),
                                        ),
                                        (
                                            "bg_color",
                                            wagtail.blocks.RegexBlock(
                                                error_messages={
                                                    "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe"
                                                },
                                                label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)",
                                                regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
                                                required=False,
                                            ),
                                        ),
                                        ("title", wagtail.blocks.CharBlock(label="Titre", required=False)),
                                        (
                                            "columns",
                                            wagtail.blocks.StreamBlock(
                                                [
                                                    (
                                                        "text",
                                                        wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"),
                                                    ),
                                                    (
                                                        "image",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Titre", required=False
                                                                    ),
                                                                ),
                                                                (
                                                                    "image",
                                                                    wagtail.images.blocks.ImageChooserBlock(
                                                                        label="Illustration"
                                                                    ),
                                                                ),
                                                                (
                                                                    "alt",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Texte alternatif (description textuelle de l’image)",
                                                                        required=False,
                                                                    ),
                                                                ),
                                                                (
                                                                    "caption",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Légende", required=False
                                                                    ),
                                                                ),
                                                                (
                                                                    "url",
                                                                    wagtail.blocks.URLBlock(
                                                                        label="Lien", required=False
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Image",
                                                        ),
                                                    ),
                                                    (
                                                        "video",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Titre", required=False
                                                                    ),
                                                                ),
                                                                ("caption", wagtail.blocks.CharBlock(label="Légende")),
                                                                (
                                                                    "url",
                                                                    wagtail.blocks.URLBlock(
                                                                        help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)",
                                                                        label="Lien de la vidéo",
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Vidéo",
                                                        ),
                                                    ),
                                                    (
                                                        "card",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                ("title", wagtail.blocks.CharBlock(label="Titre")),
                                                                (
                                                                    "description",
                                                                    wagtail.blocks.TextBlock(label="Texte"),
                                                                ),
                                                                (
                                                                    "image",
                                                                    wagtail.images.blocks.ImageChooserBlock(
                                                                        label="Image"
                                                                    ),
                                                                ),
                                                                (
                                                                    "url",
                                                                    wagtail.blocks.URLBlock(
                                                                        label="Lien", required=False
                                                                    ),
                                                                ),
                                                                (
                                                                    "document",
                                                                    wagtail.documents.blocks.DocumentChooserBlock(
                                                                        help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).",
                                                                        label="ou Document",
                                                                        required=False,
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Carte",
                                                        ),
                                                    ),
                                                    (
                                                        "quote",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "image",
                                                                    wagtail.images.blocks.ImageChooserBlock(
                                                                        label="Illustration (à gauche)", required=False
                                                                    ),
                                                                ),
                                                                ("quote", wagtail.blocks.CharBlock(label="Citation")),
                                                                (
                                                                    "author_name",
                                                                    wagtail.blocks.CharBlock(label="Nom de l’auteur"),
                                                                ),
                                                                (
                                                                    "author_title",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Titre de l’auteur"
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Citation",
                                                        ),
                                                    ),
                                                    (
                                                        "text_cta",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "text",
                                                                    wagtail.blocks.RichTextBlock(
                                                                        label="Texte avec mise en forme",
                                                                        required=False,
                                                                    ),
                                                                ),
                                                                (
                                                                    "cta_label",
                                                                    wagtail.blocks.CharBlock(
                                                                        help_text="Le lien apparait comme un bouton sous le bloc de texte",
                                                                        label="Titre de l’appel à l’action",
                                                                        required=False,
                                                                    ),
                                                                ),
                                                                (
                                                                    "cta_url",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Lien", required=False
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Texte et appel à l’action",
                                                        ),
                                                    ),
                                                    (
                                                        "iframe",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(
                                                                        help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.",
                                                                        label="Titre",
                                                                    ),
                                                                ),
                                                                (
                                                                    "url",
                                                                    wagtail.blocks.URLBlock(
                                                                        help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa",
                                                                        label="Lien du cadre intégré",
                                                                    ),
                                                                ),
                                                                (
                                                                    "height",
                                                                    wagtail.blocks.IntegerBlock(
                                                                        label="Hauteur en pixels"
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Cadre intégré",
                                                        ),
                                                    ),
                                                ],
                                                label="Multi-colonnes",
                                            ),
                                        ),
                                    ],
                                    label="Multi-colonnes",
                                ),
                            ),
                            (
                                "accordions",
                                wagtail.blocks.StreamBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre")),
                                        (
                                            "accordion",
                                            wagtail.blocks.StructBlock(
                                                [
                                                    ("title", wagtail.blocks.CharBlock(label="Titre")),
                                                    ("content", wagtail.blocks.RichTextBlock(label="Contenu")),
                                                ],
                                                label="Accordéon",
                                                max_num=15,
                                                min_num=1,
                                            ),
                                        ),
                                    ],
                                    label="Accordéons",
                                ),
                            ),
                            (
                                "stepper",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre")),
                                        ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")),
                                        ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")),
                                        (
                                            "steps",
                                            wagtail.blocks.StreamBlock(
                                                [
                                                    (
                                                        "step",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(label="Titre de l’étape"),
                                                                ),
                                                                ("detail", wagtail.blocks.TextBlock(label="Détail")),
                                                            ],
                                                            label="Étape",
                                                        ),
                                                    )
                                                ],
                                                label="Les étapes",
                                            ),
                                        ),
                                    ],
                                    label="Étapes",
                                ),
                            ),
                            (
                                "separator",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "top_margin",
                                            wagtail.blocks.IntegerBlock(
                                                default=3, label="Espacement au dessus", max_value=15, min_value=0
                                            ),
                                        ),
                                        (
                                            "bottom_margin",
                                            wagtail.blocks.IntegerBlock(
                                                default=3, label="Espacement en dessous", max_value=15, min_value=0
                                            ),
                                        ),
                                    ],
                                    label="Séparateur",
                                ),
                            ),
                            ("markdown", wagtailmarkdown.blocks.MarkdownBlock()),
                            (
                                "html",
                                wagtail.blocks.RawHTMLBlock(
                                    help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n                Un code malveillant peut compromettre la sécurité du site.",
                                    readonly=True,
                                ),
                            ),
                        ],
                        blank=True,
                    ),
                ),
                ("date", models.DateTimeField(default=django.utils.timezone.now, verbose_name="Post date")),
                (
                    "header_image",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="wagtailimages.image",
                        verbose_name="Header image",
                    ),
                ),
            ],
            options={
                "verbose_name": "Blog page",
            },
            bases=("wagtailcore.page",),
        ),
        migrations.CreateModel(
            name="BlogIndexPage",
            fields=[
                (
                    "page_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="wagtailcore.page",
                    ),
                ),
                (
                    "body",
                    wagtail.fields.StreamField(
                        [
                            ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")),
                            ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")),
                            (
                                "image",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre", required=False)),
                                        ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")),
                                        (
                                            "alt",
                                            wagtail.blocks.CharBlock(
                                                label="Texte alternatif (description textuelle de l’image)",
                                                required=False,
                                            ),
                                        ),
                                        ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)),
                                        ("url", wagtail.blocks.URLBlock(label="Lien", required=False)),
                                    ]
                                ),
                            ),
                            (
                                "imageandtext",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")),
                                        (
                                            "image_side",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[("left", "Gauche"), ("right", "Droite")],
                                                label="Côté où afficher l’image",
                                            ),
                                        ),
                                        (
                                            "image_ratio",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")],
                                                label="Largeur de l’image",
                                            ),
                                        ),
                                        ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")),
                                        (
                                            "link_label",
                                            wagtail.blocks.CharBlock(
                                                help_text="Le lien apparait en bas du bloc de droite, avec une flèche",
                                                label="Titre du lien",
                                                required=False,
                                            ),
                                        ),
                                        (
                                            "page",
                                            wagtail.blocks.PageChooserBlock(label="Lien interne", required=False),
                                        ),
                                        ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)),
                                    ],
                                    label="Bloc image et texte",
                                ),
                            ),
                            (
                                "alert",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)),
                                        (
                                            "description",
                                            wagtail.blocks.TextBlock(label="Texte du message", required=False),
                                        ),
                                        (
                                            "level",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[
                                                    ("error", "Erreur"),
                                                    ("success", "Succès"),
                                                    ("info", "Information"),
                                                    ("warning", "Attention"),
                                                ],
                                                label="Type de message",
                                            ),
                                        ),
                                        (
                                            "heading_tag",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[
                                                    ("h2", "En-tête 2"),
                                                    ("h3", "En-tête 3"),
                                                    ("h4", "En-tête 4"),
                                                    ("h5", "En-tête 5"),
                                                    ("h6", "En-tête 6"),
                                                    ("p", "Paragraphe"),
                                                ],
                                                help_text="À adapter à la structure de la page. Par défaut en-tête 3.",
                                                label="Niveau de titre",
                                            ),
                                        ),
                                    ],
                                    label="Message d’alerte",
                                ),
                            ),
                            (
                                "callout",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "title",
                                            wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False),
                                        ),
                                        ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)),
                                        (
                                            "heading_tag",
                                            wagtail.blocks.ChoiceBlock(
                                                choices=[
                                                    ("h2", "En-tête 2"),
                                                    ("h3", "En-tête 3"),
                                                    ("h4", "En-tête 4"),
                                                    ("h5", "En-tête 5"),
                                                    ("h6", "En-tête 6"),
                                                    ("p", "Paragraphe"),
                                                ],
                                                help_text="À adapter à la structure de la page. Par défaut en-tête 3.",
                                                label="Niveau de titre",
                                            ),
                                        ),
                                    ],
                                    label="Texte mise en avant",
                                ),
                            ),
                            (
                                "quote",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "image",
                                            wagtail.images.blocks.ImageChooserBlock(
                                                label="Illustration (à gauche)", required=False
                                            ),
                                        ),
                                        ("quote", wagtail.blocks.CharBlock(label="Citation")),
                                        ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")),
                                        ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")),
                                    ],
                                    label="Citation",
                                ),
                            ),
                            (
                                "video",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre", required=False)),
                                        ("caption", wagtail.blocks.CharBlock(label="Légende")),
                                        (
                                            "url",
                                            wagtail.blocks.URLBlock(
                                                help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)",
                                                label="Lien de la vidéo",
                                            ),
                                        ),
                                    ],
                                    label="Vidéo",
                                ),
                            ),
                            (
                                "multicolumns",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "bg_image",
                                            wagtail.images.blocks.ImageChooserBlock(
                                                label="Image d’arrière plan", required=False
                                            ),
                                        ),
                                        (
                                            "bg_color",
                                            wagtail.blocks.RegexBlock(
                                                error_messages={
                                                    "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe"
                                                },
                                                label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)",
                                                regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
                                                required=False,
                                            ),
                                        ),
                                        ("title", wagtail.blocks.CharBlock(label="Titre", required=False)),
                                        (
                                            "columns",
                                            wagtail.blocks.StreamBlock(
                                                [
                                                    (
                                                        "text",
                                                        wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"),
                                                    ),
                                                    (
                                                        "image",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Titre", required=False
                                                                    ),
                                                                ),
                                                                (
                                                                    "image",
                                                                    wagtail.images.blocks.ImageChooserBlock(
                                                                        label="Illustration"
                                                                    ),
                                                                ),
                                                                (
                                                                    "alt",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Texte alternatif (description textuelle de l’image)",
                                                                        required=False,
                                                                    ),
                                                                ),
                                                                (
                                                                    "caption",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Légende", required=False
                                                                    ),
                                                                ),
                                                                (
                                                                    "url",
                                                                    wagtail.blocks.URLBlock(
                                                                        label="Lien", required=False
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Image",
                                                        ),
                                                    ),
                                                    (
                                                        "video",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Titre", required=False
                                                                    ),
                                                                ),
                                                                ("caption", wagtail.blocks.CharBlock(label="Légende")),
                                                                (
                                                                    "url",
                                                                    wagtail.blocks.URLBlock(
                                                                        help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)",
                                                                        label="Lien de la vidéo",
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Vidéo",
                                                        ),
                                                    ),
                                                    (
                                                        "card",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                ("title", wagtail.blocks.CharBlock(label="Titre")),
                                                                (
                                                                    "description",
                                                                    wagtail.blocks.TextBlock(label="Texte"),
                                                                ),
                                                                (
                                                                    "image",
                                                                    wagtail.images.blocks.ImageChooserBlock(
                                                                        label="Image"
                                                                    ),
                                                                ),
                                                                (
                                                                    "url",
                                                                    wagtail.blocks.URLBlock(
                                                                        label="Lien", required=False
                                                                    ),
                                                                ),
                                                                (
                                                                    "document",
                                                                    wagtail.documents.blocks.DocumentChooserBlock(
                                                                        help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).",
                                                                        label="ou Document",
                                                                        required=False,
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Carte",
                                                        ),
                                                    ),
                                                    (
                                                        "quote",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "image",
                                                                    wagtail.images.blocks.ImageChooserBlock(
                                                                        label="Illustration (à gauche)", required=False
                                                                    ),
                                                                ),
                                                                ("quote", wagtail.blocks.CharBlock(label="Citation")),
                                                                (
                                                                    "author_name",
                                                                    wagtail.blocks.CharBlock(label="Nom de l’auteur"),
                                                                ),
                                                                (
                                                                    "author_title",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Titre de l’auteur"
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Citation",
                                                        ),
                                                    ),
                                                    (
                                                        "text_cta",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "text",
                                                                    wagtail.blocks.RichTextBlock(
                                                                        label="Texte avec mise en forme",
                                                                        required=False,
                                                                    ),
                                                                ),
                                                                (
                                                                    "cta_label",
                                                                    wagtail.blocks.CharBlock(
                                                                        help_text="Le lien apparait comme un bouton sous le bloc de texte",
                                                                        label="Titre de l’appel à l’action",
                                                                        required=False,
                                                                    ),
                                                                ),
                                                                (
                                                                    "cta_url",
                                                                    wagtail.blocks.CharBlock(
                                                                        label="Lien", required=False
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Texte et appel à l’action",
                                                        ),
                                                    ),
                                                    (
                                                        "iframe",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(
                                                                        help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.",
                                                                        label="Titre",
                                                                    ),
                                                                ),
                                                                (
                                                                    "url",
                                                                    wagtail.blocks.URLBlock(
                                                                        help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa",
                                                                        label="Lien du cadre intégré",
                                                                    ),
                                                                ),
                                                                (
                                                                    "height",
                                                                    wagtail.blocks.IntegerBlock(
                                                                        label="Hauteur en pixels"
                                                                    ),
                                                                ),
                                                            ],
                                                            label="Cadre intégré",
                                                        ),
                                                    ),
                                                ],
                                                label="Multi-colonnes",
                                            ),
                                        ),
                                    ],
                                    label="Multi-colonnes",
                                ),
                            ),
                            (
                                "accordions",
                                wagtail.blocks.StreamBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre")),
                                        (
                                            "accordion",
                                            wagtail.blocks.StructBlock(
                                                [
                                                    ("title", wagtail.blocks.CharBlock(label="Titre")),
                                                    ("content", wagtail.blocks.RichTextBlock(label="Contenu")),
                                                ],
                                                label="Accordéon",
                                                max_num=15,
                                                min_num=1,
                                            ),
                                        ),
                                    ],
                                    label="Accordéons",
                                ),
                            ),
                            (
                                "stepper",
                                wagtail.blocks.StructBlock(
                                    [
                                        ("title", wagtail.blocks.CharBlock(label="Titre")),
                                        ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")),
                                        ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")),
                                        (
                                            "steps",
                                            wagtail.blocks.StreamBlock(
                                                [
                                                    (
                                                        "step",
                                                        wagtail.blocks.StructBlock(
                                                            [
                                                                (
                                                                    "title",
                                                                    wagtail.blocks.CharBlock(label="Titre de l’étape"),
                                                                ),
                                                                ("detail", wagtail.blocks.TextBlock(label="Détail")),
                                                            ],
                                                            label="Étape",
                                                        ),
                                                    )
                                                ],
                                                label="Les étapes",
                                            ),
                                        ),
                                    ],
                                    label="Étapes",
                                ),
                            ),
                            (
                                "separator",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "top_margin",
                                            wagtail.blocks.IntegerBlock(
                                                default=3, label="Espacement au dessus", max_value=15, min_value=0
                                            ),
                                        ),
                                        (
                                            "bottom_margin",
                                            wagtail.blocks.IntegerBlock(
                                                default=3, label="Espacement en dessous", max_value=15, min_value=0
                                            ),
                                        ),
                                    ],
                                    label="Séparateur",
                                ),
                            ),
                            ("markdown", wagtailmarkdown.blocks.MarkdownBlock()),
                            (
                                "html",
                                wagtail.blocks.RawHTMLBlock(
                                    help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n                Un code malveillant peut compromettre la sécurité du site.",
                                    readonly=True,
                                ),
                            ),
                        ],
                        blank=True,
                    ),
                ),
                (
                    "posts_per_page",
                    models.PositiveSmallIntegerField(
                        default=10,
                        validators=[
                            django.core.validators.MaxValueValidator(100),
                            django.core.validators.MinValueValidator(1),
                        ],
                        verbose_name="Posts per page",
                    ),
                ),
                (
                    "header_image",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="wagtailimages.image",
                        verbose_name="Header image",
                    ),
                ),
            ],
            options={
                "verbose_name": "Blog index",
            },
            bases=("wagtailcore.page",),
        ),
        migrations.CreateModel(
            name="Category",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("translation_key", models.UUIDField(default=uuid.uuid4, editable=False)),
                ("name", models.CharField(max_length=80, unique=True, verbose_name="Category name")),
                ("slug", models.SlugField(max_length=80, unique=True)),
                ("description", models.CharField(blank=True, max_length=500, verbose_name="Description")),
                (
                    "locale",
                    models.ForeignKey(
                        editable=False,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="+",
                        to="wagtailcore.locale",
                    ),
                ),
                (
                    "parent",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="children",
                        to="sites_conformes_blog.category",
                        verbose_name="Parent category",
                    ),
                ),
            ],
            options={
                "verbose_name": "Category",
                "verbose_name_plural": "Categories",
                "ordering": ["name"],
                "unique_together": {("name", "locale"), ("slug", "locale"), ("translation_key", "locale")},
            },
            bases=(wagtail.search.index.Indexed, models.Model),
        ),
        migrations.CreateModel(
            name="CategoryEntryPage",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "category",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="sites_conformes_blog.category",
                        verbose_name="Category",
                    ),
                ),
                (
                    "page",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="entry_categories",
                        to="sites_conformes_blog.blogentrypage",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="blogentrypage",
            name="blog_categories",
            field=modelcluster.fields.ParentalManyToManyField(
                blank=True, null=True, through="sites_conformes_blog.CategoryEntryPage", to="sites_conformes_blog.category", verbose_name="Categories"
            ),
        ),
        migrations.CreateModel(
            name="TagEntryPage",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "content_object",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE, related_name="entry_tags", to="sites_conformes_blog.blogentrypage"
                    ),
                ),
                (
                    "tag",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(app_label)s_%(class)s_items",
                        to="taggit.tag",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="blogentrypage",
            name="tags",
            field=modelcluster.contrib.taggit.ClusterTaggableManager(
                blank=True,
                help_text="A comma-separated list of tags.",
                through="sites_conformes_blog.TagEntryPage",
                to="taggit.Tag",
                verbose_name="Tags",
            ),
        ),
    ]
